Misc cleanup
This commit is contained in:
@@ -2508,11 +2508,10 @@ public class UnitTypes{
|
|||||||
speed = 0.48f;
|
speed = 0.48f;
|
||||||
health = 20000;
|
health = 20000;
|
||||||
armor = 25f;
|
armor = 25f;
|
||||||
areaDamage = 22f;
|
areaDamage = 30f;
|
||||||
rotateSpeed = 0.9f;
|
rotateSpeed = 0.8f;
|
||||||
treadRects = new Rect[]{new Rect(27, 152, 56, 73), new Rect(24, 51 - 9, 29, 17), new Rect(59, 18 - 9, 39, 19)};
|
treadRects = new Rect[]{new Rect(27, 152, 56, 73), new Rect(24, 51 - 9, 29, 17), new Rect(59, 18 - 9, 39, 19)};
|
||||||
|
|
||||||
//TODO maybe different sprite, weapon impl
|
|
||||||
weapons.add(new Weapon("conquer-weapon"){{
|
weapons.add(new Weapon("conquer-weapon"){{
|
||||||
layerOffset = 0.1f;
|
layerOffset = 0.1f;
|
||||||
reload = 120f;
|
reload = 120f;
|
||||||
@@ -2571,7 +2570,6 @@ public class UnitTypes{
|
|||||||
}}
|
}}
|
||||||
);
|
);
|
||||||
|
|
||||||
//TODO this is a bit over-the-top
|
|
||||||
for(int i = 1; i <= 3; i++){
|
for(int i = 1; i <= 3; i++){
|
||||||
int fi = i;
|
int fi = i;
|
||||||
parts.add(new RegionPart("-blade"){{
|
parts.add(new RegionPart("-blade"){{
|
||||||
@@ -2585,7 +2583,6 @@ public class UnitTypes{
|
|||||||
layerOffset = -0.002f;
|
layerOffset = -0.002f;
|
||||||
|
|
||||||
x = 11 / 4f;
|
x = 11 / 4f;
|
||||||
y = 0 / 4f;
|
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2621,10 +2618,6 @@ public class UnitTypes{
|
|||||||
sparkStroke = 3f;
|
sparkStroke = 3f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//trailChance = 0.1f;
|
|
||||||
trailInterval = 3f;
|
|
||||||
trailParam = 4f;
|
|
||||||
|
|
||||||
int count = 6;
|
int count = 6;
|
||||||
for(int j = 0; j < count; j++){
|
for(int j = 0; j < count; j++){
|
||||||
int s = j;
|
int s = j;
|
||||||
@@ -2632,7 +2625,7 @@ public class UnitTypes{
|
|||||||
float fin = 0.05f + (j + 1) / (float)count;
|
float fin = 0.05f + (j + 1) / (float)count;
|
||||||
float spd = speed;
|
float spd = speed;
|
||||||
float life = lifetime / Mathf.lerp(fin, 1f, 0.5f);
|
float life = lifetime / Mathf.lerp(fin, 1f, 0.5f);
|
||||||
spawnBullets.add(new BasicBulletType(spd * (fin), 40){{
|
spawnBullets.add(new BasicBulletType(spd * fin, 45){{
|
||||||
drag = 0.002f;
|
drag = 0.002f;
|
||||||
width = 8f;
|
width = 8f;
|
||||||
height = 10f;
|
height = 10f;
|
||||||
@@ -2671,10 +2664,7 @@ public class UnitTypes{
|
|||||||
}};
|
}};
|
||||||
}});
|
}});
|
||||||
|
|
||||||
//TODO could change color when shooting
|
decals.add(new UnitDecal("conquer-glow", Color.red, Blending.additive, -1f));
|
||||||
decals.add(new UnitDecal("conquer-glow", Color.red, Blending.additive){{
|
|
||||||
layer = -1f;
|
|
||||||
}});
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
@@ -2988,6 +2978,7 @@ public class UnitTypes{
|
|||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO needs weapons! cool missiles or something
|
||||||
if(false)
|
if(false)
|
||||||
weapons.add(new Weapon("quell-weapon"){{
|
weapons.add(new Weapon("quell-weapon"){{
|
||||||
x = 51 / 4f;
|
x = 51 / 4f;
|
||||||
|
|||||||
@@ -32,10 +32,9 @@ public class RegionPart extends WeaponPart{
|
|||||||
public float outlineLayerOffset = -0.001f;
|
public float outlineLayerOffset = -0.001f;
|
||||||
public float rotation, rotMove;
|
public float rotation, rotMove;
|
||||||
public float x, y, moveX, moveY;
|
public float x, y, moveX, moveY;
|
||||||
public boolean oscAbs = false;
|
|
||||||
public @Nullable Color color, colorTo;
|
public @Nullable Color color, colorTo;
|
||||||
public Color heatColor = Pal.turretHeat.cpy();
|
public Color heatColor = Pal.turretHeat.cpy();
|
||||||
public @Nullable WeaponPart child;
|
public Seq<WeaponPart> children = new Seq<>();
|
||||||
|
|
||||||
public RegionPart(String region){
|
public RegionPart(String region){
|
||||||
this.suffix = region;
|
this.suffix = region;
|
||||||
@@ -103,7 +102,7 @@ public class RegionPart extends WeaponPart{
|
|||||||
|
|
||||||
//draw child, if applicable - only at the end
|
//draw child, if applicable - only at the end
|
||||||
//TODO lots of copy-paste here
|
//TODO lots of copy-paste here
|
||||||
if(child != null){
|
if(children.size > 0){
|
||||||
for(int s = 0; s < len; s++){
|
for(int s = 0; s < len; s++){
|
||||||
int i = (params.sideOverride == -1 ? s : params.sideOverride);
|
int i = (params.sideOverride == -1 ? s : params.sideOverride);
|
||||||
float sign = i == 1 ? -1 : 1;
|
float sign = i == 1 ? -1 : 1;
|
||||||
@@ -111,7 +110,9 @@ public class RegionPart extends WeaponPart{
|
|||||||
|
|
||||||
childParam.set(params.warmup, params.reload, params.smoothReload, params.heat, params.x + Tmp.v1.x, params.y + Tmp.v1.y, i * sign + rotMove * prog * sign + params.rotation);
|
childParam.set(params.warmup, params.reload, params.smoothReload, params.heat, params.x + Tmp.v1.x, params.y + Tmp.v1.y, i * sign + rotMove * prog * sign + params.rotation);
|
||||||
childParam.sideOverride = i;
|
childParam.sideOverride = i;
|
||||||
child.draw(childParam);
|
for(var child : children){
|
||||||
|
child.draw(childParam);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -137,7 +138,7 @@ public class RegionPart extends WeaponPart{
|
|||||||
}
|
}
|
||||||
|
|
||||||
heat = Core.atlas.find(name + suffix + "-heat");
|
heat = Core.atlas.find(name + suffix + "-heat");
|
||||||
if(child != null){
|
for(var child : children){
|
||||||
child.load(name);
|
child.load(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -147,7 +148,7 @@ public class RegionPart extends WeaponPart{
|
|||||||
if(outline && drawRegion){
|
if(outline && drawRegion){
|
||||||
out.addAll(regions);
|
out.addAll(regions);
|
||||||
}
|
}
|
||||||
if(child != null){
|
for(var child : children){
|
||||||
child.getOutlines(out);
|
child.getOutlines(out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,9 +24,10 @@ public class UnitDecal{
|
|||||||
this.color = color;
|
this.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UnitDecal(String region, Color color, Blending blending){
|
public UnitDecal(String region, Color color, Blending blending, float layer){
|
||||||
this.region = region;
|
this.region = region;
|
||||||
this.color = color;
|
this.color = color;
|
||||||
|
this.layer = layer;
|
||||||
this.blending = blending;
|
this.blending = blending;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user