More animation improvements

This commit is contained in:
Anuken
2022-02-03 12:47:52 -05:00
parent 2f989d57bb
commit 18c192d307
11 changed files with 157 additions and 45 deletions

View File

@@ -3115,7 +3115,7 @@ public class Blocks{
parts.addAll(
new RegionPart("-back"){{
useReload = false;
progress = PartProgress.warmup;
mirror = true;
rotMove = 40f;
x = 22 / 4f;
@@ -3125,7 +3125,7 @@ public class Blocks{
heatColor = heatc;
}},
new RegionPart("-front"){{
useReload = false;
progress = PartProgress.warmup;
mirror = true;
rotMove = 40f;
x = 20 / 4f;
@@ -3136,7 +3136,7 @@ public class Blocks{
heatColor = heatc;
}},
new RegionPart("-nozzle"){{
useReload = false;
progress = PartProgress.warmup;
mirror = true;
moveX = 8f / 4f;
heatColor = Color.valueOf("f03b0e");
@@ -3235,10 +3235,9 @@ public class Blocks{
moveX = 2f * 4f / 3f;
moveY = -0.5f;
rotMove = -40f;
useReload = false;
progress = heatProgress = PartProgress.warmup;
under = true;
heatColor = Color.red.cpy();
useProgressHeat = true;
interp = Interp.pow2Out;
}});
}};

View File

@@ -2518,7 +2518,7 @@ public class UnitTypes{
reload = 120f;
shootY = 32.5f;
shake = 5f;
recoil = 4f;
recoil = 5f;
rotate = true;
rotateSpeed = 0.6f;
mirror = false;
@@ -2530,46 +2530,64 @@ public class UnitTypes{
cooldownTime = 110f;
heatColor = Color.valueOf("f9350f");
parts.add(
parts.addAll(
new RegionPart("-glow"){{
color = Color.red;
blending = Blending.additive;
outline = mirror = false;
}},
new RegionPart("-sides"){{
useReload = false;
progress = PartProgress.warmup;
mirror = true;
under = true;
moveX = 0.5f;
moveY = 0.5f;
moveX = 0.75f;
moveY = 0.75f;
rotMove = 82f;
x = 38 / 4f;
y = 9 / 4f;
x = 37 / 4f;
y = 8 / 4f;
}},
new RegionPart("-sinks"){{
useReload = false;
progress = PartProgress.warmup;
mirror = true;
under = true;
heatColor = new Color(1f, 0.1f, 0.1f);
moveX = 15f / 4f;
moveY = -13f / 4f;
x = 34 / 4f;
y = -36 / 4f;
moveX = 17f / 4f;
moveY = -15f / 4f;
x = 32 / 4f;
y = -34 / 4f;
}},
new RegionPart("-sinks-heat"){{
blending = Blending.additive;
useReload = false;
progress = PartProgress.warmup;
mirror = true;
outline = false;
colorTo = new Color(1f, 0f, 0f, 0.5f);
color = colorTo.cpy().a(0f);
moveX = 15f / 4f;
moveY = -13f / 4f;
x = 34 / 4f;
y = -36 / 4f;
moveX = 17f / 4f;
moveY = -15f / 4f;
x = 32 / 4f;
y = -34 / 4f;
}}
);
//TODO this is a bit over-the-top
for(int i = 1; i <= 3; i++){
int fi = i;
parts.add(new RegionPart("-blade"){{
progress = PartProgress.warmup.delay((3 - fi) * 0.3f).blend(PartProgress.reload, 0.3f);
heatProgress = PartProgress.heat.add(0.3f).min(PartProgress.warmup);
heatColor = new Color(1f, 0.1f, 0.1f);
mirror = true;
under = true;
rotMove = -40f * fi;
moveX = 3f;
layerOffset = -0.002f;
x = 11 / 4f;
y = 0 / 4f;
}});
}
bullet = new BasicBulletType(8.5f, 250){{
sprite = "missile-large";
width = 12f;