WIP t2 insect
This commit is contained in:
@@ -37,7 +37,8 @@ public class UnitTypes{
|
||||
|
||||
//legs
|
||||
public static @EntityDef({Unitc.class, Legsc.class}) UnitType corvus, atrax,
|
||||
latum, bulwark, krepost;
|
||||
latum, anthicus,
|
||||
bulwark, krepost;
|
||||
|
||||
//legs, legacy
|
||||
public static @EntityDef(value = {Unitc.class, Legsc.class}, legacy = true) UnitType spiroct, arkyid, toxopid;
|
||||
@@ -2922,6 +2923,32 @@ public class UnitTypes{
|
||||
}});
|
||||
}};
|
||||
|
||||
anthicus = new ErekirUnitType("anthicus"){{
|
||||
speed = 0.7f;
|
||||
drag = 0.1f;
|
||||
hitSize = 21f;
|
||||
rotateSpeed = 3f;
|
||||
health = 1100;
|
||||
armor = 5f;
|
||||
|
||||
legCount = 6;
|
||||
legLength = 18f;
|
||||
lockLegBase = true;
|
||||
legContinuousMove = true;
|
||||
legExtension = -3f;
|
||||
legBaseOffset = 7f;
|
||||
maxStretch = 1.1f;
|
||||
maxCompress = 0.2f;
|
||||
legLengthScl = 0.95f;
|
||||
legTrns = 0.7f;
|
||||
|
||||
legMoveSpace = 1f;
|
||||
hovering = true;
|
||||
|
||||
visualElevation = 0.2f;
|
||||
groundLayer = Layer.legUnit - 1f;
|
||||
}};
|
||||
|
||||
bulwark = new ErekirUnitType("bulwark"){{
|
||||
drag = 0.1f;
|
||||
speed = 0.6f;
|
||||
|
||||
@@ -163,7 +163,9 @@ public class UnitType extends UnlockableContent{
|
||||
public float drownTimeMultiplier = 1f;
|
||||
public float engineOffset = 5f, engineSize = 2.5f;
|
||||
public @Nullable Color engineColor = null;
|
||||
public @Nullable Color trailColor;
|
||||
public Color engineColorInner = Color.white;
|
||||
public float engineLayer = -1f;
|
||||
public Seq<UnitEngine> engines = new Seq<>();
|
||||
public float strafePenalty = 0.5f;
|
||||
/** If false, this unit does not physically collide with others. */
|
||||
@@ -856,8 +858,13 @@ public class UnitType extends UnlockableContent{
|
||||
|
||||
if(drawBody) drawOutline(unit);
|
||||
drawWeaponOutlines(unit);
|
||||
if(engineLayer > 0) Draw.z(engineLayer);
|
||||
if(trailLength > 0 && !naval && unit.isFlying()){
|
||||
drawTrail(unit);
|
||||
}
|
||||
if(engineSize > 0) drawEngine(unit);
|
||||
if(engines.size > 0) drawEngines(unit);
|
||||
Draw.z(z);
|
||||
if(drawBody) drawBody(unit);
|
||||
if(drawCell) drawCell(unit);
|
||||
drawWeapons(unit);
|
||||
@@ -993,10 +1000,6 @@ public class UnitType extends UnlockableContent{
|
||||
float scale = unit.elevation;
|
||||
float offset = engineOffset/2f + engineOffset/2f*scale;
|
||||
|
||||
if(trailLength > 0 && !naval){
|
||||
drawTrail(unit);
|
||||
}
|
||||
|
||||
Draw.color(engineColor == null ? unit.team.color : engineColor);
|
||||
Fill.circle(
|
||||
unit.x + Angles.trnsx(unit.rotation + 180, offset),
|
||||
@@ -1017,7 +1020,7 @@ public class UnitType extends UnlockableContent{
|
||||
unit.trail = new Trail(trailLength);
|
||||
}
|
||||
Trail trail = unit.trail;
|
||||
trail.draw(unit.team.color, (engineSize + Mathf.absin(Time.time, 2f, engineSize / 4f) * unit.elevation) * trailScl);
|
||||
trail.draw(trailColor == null ? unit.team.color : trailColor, (engineSize + Mathf.absin(Time.time, 2f, engineSize / 4f) * unit.elevation) * trailScl);
|
||||
}
|
||||
|
||||
public void drawEngines(Unit unit){
|
||||
|
||||
Reference in New Issue
Block a user