WIP t2 insect
This commit is contained in:
BIN
core/assets-raw/sprites/units/anthicus-cell.png
Normal file
BIN
core/assets-raw/sprites/units/anthicus-cell.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 777 B |
BIN
core/assets-raw/sprites/units/anthicus.png
Normal file
BIN
core/assets-raw/sprites/units/anthicus.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
@@ -547,3 +547,4 @@
|
|||||||
63145=malis|team-malis
|
63145=malis|team-malis
|
||||||
63144=canvas|block-canvas-ui
|
63144=canvas|block-canvas-ui
|
||||||
63143=armored-duct|block-armored-duct-ui
|
63143=armored-duct|block-armored-duct-ui
|
||||||
|
63142=anthicus|unit-anthicus-ui
|
||||||
|
|||||||
Binary file not shown.
@@ -37,7 +37,8 @@ public class UnitTypes{
|
|||||||
|
|
||||||
//legs
|
//legs
|
||||||
public static @EntityDef({Unitc.class, Legsc.class}) UnitType corvus, atrax,
|
public static @EntityDef({Unitc.class, Legsc.class}) UnitType corvus, atrax,
|
||||||
latum, bulwark, krepost;
|
latum, anthicus,
|
||||||
|
bulwark, krepost;
|
||||||
|
|
||||||
//legs, legacy
|
//legs, legacy
|
||||||
public static @EntityDef(value = {Unitc.class, Legsc.class}, legacy = true) UnitType spiroct, arkyid, toxopid;
|
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"){{
|
bulwark = new ErekirUnitType("bulwark"){{
|
||||||
drag = 0.1f;
|
drag = 0.1f;
|
||||||
speed = 0.6f;
|
speed = 0.6f;
|
||||||
|
|||||||
@@ -163,7 +163,9 @@ public class UnitType extends UnlockableContent{
|
|||||||
public float drownTimeMultiplier = 1f;
|
public float drownTimeMultiplier = 1f;
|
||||||
public float engineOffset = 5f, engineSize = 2.5f;
|
public float engineOffset = 5f, engineSize = 2.5f;
|
||||||
public @Nullable Color engineColor = null;
|
public @Nullable Color engineColor = null;
|
||||||
|
public @Nullable Color trailColor;
|
||||||
public Color engineColorInner = Color.white;
|
public Color engineColorInner = Color.white;
|
||||||
|
public float engineLayer = -1f;
|
||||||
public Seq<UnitEngine> engines = new Seq<>();
|
public Seq<UnitEngine> engines = new Seq<>();
|
||||||
public float strafePenalty = 0.5f;
|
public float strafePenalty = 0.5f;
|
||||||
/** If false, this unit does not physically collide with others. */
|
/** If false, this unit does not physically collide with others. */
|
||||||
@@ -856,8 +858,13 @@ public class UnitType extends UnlockableContent{
|
|||||||
|
|
||||||
if(drawBody) drawOutline(unit);
|
if(drawBody) drawOutline(unit);
|
||||||
drawWeaponOutlines(unit);
|
drawWeaponOutlines(unit);
|
||||||
|
if(engineLayer > 0) Draw.z(engineLayer);
|
||||||
|
if(trailLength > 0 && !naval && unit.isFlying()){
|
||||||
|
drawTrail(unit);
|
||||||
|
}
|
||||||
if(engineSize > 0) drawEngine(unit);
|
if(engineSize > 0) drawEngine(unit);
|
||||||
if(engines.size > 0) drawEngines(unit);
|
if(engines.size > 0) drawEngines(unit);
|
||||||
|
Draw.z(z);
|
||||||
if(drawBody) drawBody(unit);
|
if(drawBody) drawBody(unit);
|
||||||
if(drawCell) drawCell(unit);
|
if(drawCell) drawCell(unit);
|
||||||
drawWeapons(unit);
|
drawWeapons(unit);
|
||||||
@@ -993,10 +1000,6 @@ public class UnitType extends UnlockableContent{
|
|||||||
float scale = unit.elevation;
|
float scale = unit.elevation;
|
||||||
float offset = engineOffset/2f + engineOffset/2f*scale;
|
float offset = engineOffset/2f + engineOffset/2f*scale;
|
||||||
|
|
||||||
if(trailLength > 0 && !naval){
|
|
||||||
drawTrail(unit);
|
|
||||||
}
|
|
||||||
|
|
||||||
Draw.color(engineColor == null ? unit.team.color : engineColor);
|
Draw.color(engineColor == null ? unit.team.color : engineColor);
|
||||||
Fill.circle(
|
Fill.circle(
|
||||||
unit.x + Angles.trnsx(unit.rotation + 180, offset),
|
unit.x + Angles.trnsx(unit.rotation + 180, offset),
|
||||||
@@ -1017,7 +1020,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
unit.trail = new Trail(trailLength);
|
unit.trail = new Trail(trailLength);
|
||||||
}
|
}
|
||||||
Trail trail = unit.trail;
|
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){
|
public void drawEngines(Unit unit){
|
||||||
|
|||||||
Reference in New Issue
Block a user