Time to begin adding the new units
BIN
core/assets-raw/sprites/blocks/units/basic-reconstructor-top.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
core/assets-raw/sprites/blocks/units/basic-reconstructor.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
core/assets-raw/sprites/blocks/units/mech-fabricator-top.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
core/assets-raw/sprites/blocks/units/mech-fabricator.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
core/assets-raw/sprites/blocks/units/ship-fabricator-top.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
core/assets-raw/sprites/blocks/units/ship-fabricator.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
core/assets-raw/sprites/units/merui-leg-base.png
Normal file
|
After Width: | Height: | Size: 294 B |
BIN
core/assets-raw/sprites/units/merui-leg.png
Normal file
|
After Width: | Height: | Size: 269 B |
BIN
core/assets-raw/sprites/units/merui.png
Normal file
|
After Width: | Height: | Size: 812 B |
BIN
core/assets-raw/sprites/units/osc-cell.png
Normal file
|
After Width: | Height: | Size: 362 B |
BIN
core/assets-raw/sprites/units/osc.png
Normal file
|
After Width: | Height: | Size: 976 B |
@@ -551,3 +551,9 @@
|
|||||||
63141=anthicus-missile|unit-anthicus-missile-ui
|
63141=anthicus-missile|unit-anthicus-missile-ui
|
||||||
63140=shield-breaker|block-shield-breaker-ui
|
63140=shield-breaker|block-shield-breaker-ui
|
||||||
63139=obviate|unit-obviate-ui
|
63139=obviate|unit-obviate-ui
|
||||||
|
63138=tank-fabricator|block-tank-fabricator-ui
|
||||||
|
63137=mech-fabricator|block-mech-fabricator-ui
|
||||||
|
63136=ship-fabricator|block-ship-fabricator-ui
|
||||||
|
63135=unit-repair-tower|block-unit-repair-tower-ui
|
||||||
|
63134=merui|unit-merui-ui
|
||||||
|
63133=osc|unit-osc-ui
|
||||||
|
|||||||
@@ -139,8 +139,11 @@ public class Blocks{
|
|||||||
repairPoint, repairTurret,
|
repairPoint, repairTurret,
|
||||||
|
|
||||||
//units - erekir
|
//units - erekir
|
||||||
fabricator,
|
tankFabricator, shipFabricator, mechFabricator,
|
||||||
tankReconstructor, shipReconstructor, mechReconstructor,
|
|
||||||
|
basicReconstructor,
|
||||||
|
//tankReconstructor, shipReconstructor, mechReconstructor,
|
||||||
|
|
||||||
tankAssembler, shipAssembler, mechAssembler,
|
tankAssembler, shipAssembler, mechAssembler,
|
||||||
//TODO maybe making it 5x5 would be more appropriate, seems kinda cheap.
|
//TODO maybe making it 5x5 would be more appropriate, seems kinda cheap.
|
||||||
basicAssemblerModule,
|
basicAssemblerModule,
|
||||||
@@ -4141,7 +4144,7 @@ public class Blocks{
|
|||||||
//endregion
|
//endregion
|
||||||
//region units - erekir
|
//region units - erekir
|
||||||
|
|
||||||
fabricator = new UnitFactory("fabricator"){{
|
tankFabricator = new UnitFactory("tank-fabricator"){{
|
||||||
requirements(Category.units, with(Items.silicon, 200, Items.beryllium, 150));
|
requirements(Category.units, with(Items.silicon, 200, Items.beryllium, 150));
|
||||||
size = 3;
|
size = 3;
|
||||||
configurable = false;
|
configurable = false;
|
||||||
@@ -4152,6 +4155,48 @@ public class Blocks{
|
|||||||
consumePower(2f);
|
consumePower(2f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
mechFabricator = new UnitFactory("mech-fabricator"){{
|
||||||
|
requirements(Category.units, with(Items.silicon, 200, Items.beryllium, 150));
|
||||||
|
size = 3;
|
||||||
|
configurable = false;
|
||||||
|
plans.add(new UnitPlan(UnitTypes.merui, 60f * 35f, with(Items.beryllium, 40f, Items.silicon, 50f)));
|
||||||
|
researchCost = with(Items.beryllium, 200, Items.graphite, 80, Items.silicon, 80);
|
||||||
|
regionSuffix = "-dark";
|
||||||
|
fogRadius = 3;
|
||||||
|
consumePower(2f);
|
||||||
|
}};
|
||||||
|
|
||||||
|
shipFabricator = new UnitFactory("ship-fabricator"){{
|
||||||
|
requirements(Category.units, with(Items.silicon, 200, Items.beryllium, 150));
|
||||||
|
size = 3;
|
||||||
|
configurable = false;
|
||||||
|
plans.add(new UnitPlan(UnitTypes.osc, 60f * 35f, with(Items.beryllium, 40f, Items.silicon, 50f)));
|
||||||
|
researchCost = with(Items.beryllium, 200, Items.graphite, 80, Items.silicon, 80);
|
||||||
|
regionSuffix = "-dark";
|
||||||
|
fogRadius = 3;
|
||||||
|
consumePower(2f);
|
||||||
|
}};
|
||||||
|
|
||||||
|
basicReconstructor = new Reconstructor("basic-reconstructor"){{
|
||||||
|
requirements(Category.units, with(Items.beryllium, 250, Items.tungsten, 120, Items.silicon, 150));
|
||||||
|
regionSuffix = "-dark";
|
||||||
|
|
||||||
|
size = 3;
|
||||||
|
consumePower(2f);
|
||||||
|
consumeLiquid(Liquids.hydrogen, 3f / 60f);
|
||||||
|
consumeItems(with(Items.silicon, 50, Items.tungsten, 40));
|
||||||
|
|
||||||
|
constructTime = 60f * 40f;
|
||||||
|
researchCostMultiplier = 0.75f;
|
||||||
|
|
||||||
|
upgrades.addAll(
|
||||||
|
new UnitType[]{UnitTypes.stell, UnitTypes.locus},
|
||||||
|
new UnitType[]{UnitTypes.merui, UnitTypes.latum},
|
||||||
|
new UnitType[]{UnitTypes.osc, UnitTypes.avert}
|
||||||
|
);
|
||||||
|
}};
|
||||||
|
|
||||||
|
/*
|
||||||
mechReconstructor = new Reconstructor("mech-reconstructor"){{
|
mechReconstructor = new Reconstructor("mech-reconstructor"){{
|
||||||
requirements(Category.units, with(Items.beryllium, 250, Items.tungsten, 120, Items.silicon, 150));
|
requirements(Category.units, with(Items.beryllium, 250, Items.tungsten, 120, Items.silicon, 150));
|
||||||
regionSuffix = "-dark";
|
regionSuffix = "-dark";
|
||||||
@@ -4199,7 +4244,7 @@ public class Blocks{
|
|||||||
upgrades.addAll(
|
upgrades.addAll(
|
||||||
new UnitType[]{UnitTypes.stell, UnitTypes.locus}
|
new UnitType[]{UnitTypes.stell, UnitTypes.locus}
|
||||||
);
|
);
|
||||||
}};
|
}};*/
|
||||||
|
|
||||||
tankAssembler = new UnitAssembler("tank-assembler"){{
|
tankAssembler = new UnitAssembler("tank-assembler"){{
|
||||||
requirements(Category.units, with(Items.graphite, 600, Items.beryllium, 600, Items.oxide, 250, Items.tungsten, 400, Items.silicon, 500));
|
requirements(Category.units, with(Items.graphite, 600, Items.beryllium, 600, Items.oxide, 250, Items.tungsten, 400, Items.silicon, 500));
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ public class ErekirTechTree{
|
|||||||
node(cliffCrusher, () -> {
|
node(cliffCrusher, () -> {
|
||||||
node(siliconArcFurnace, () -> {
|
node(siliconArcFurnace, () -> {
|
||||||
node(electrolyzer, Seq.with(new OnSector(three)), () -> {
|
node(electrolyzer, Seq.with(new OnSector(three)), () -> {
|
||||||
node(oxidationChamber, Seq.with(new Research(mechReconstructor), new OnSector(four)), () -> {
|
node(oxidationChamber, Seq.with(new Research(basicReconstructor), new OnSector(four)), () -> {
|
||||||
node(electricHeater, Seq.with(new OnSector(four)), () -> {
|
node(electricHeater, Seq.with(new OnSector(four)), () -> {
|
||||||
node(heatRedirector, () -> {
|
node(heatRedirector, () -> {
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@ public class ErekirTechTree{
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
node(breach, Seq.with(new Research(siliconArcFurnace), new Research(fabricator)), () -> {
|
node(breach, Seq.with(new Research(siliconArcFurnace), new Research(tankFabricator)), () -> {
|
||||||
node(berylliumWall, () -> {
|
node(berylliumWall, () -> {
|
||||||
node(berylliumWallLarge, () -> {
|
node(berylliumWallLarge, () -> {
|
||||||
|
|
||||||
@@ -261,7 +261,7 @@ public class ErekirTechTree{
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
node(radar, Seq.with(new Research(beamNode), new Research(turbineCondenser), new Research(fabricator), new OnSector(SectorPresets.two)), () -> {
|
node(radar, Seq.with(new Research(beamNode), new Research(turbineCondenser), new Research(tankFabricator), new OnSector(SectorPresets.two)), () -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -272,44 +272,39 @@ public class ErekirTechTree{
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
node(fabricator, Seq.with(new Research(siliconArcFurnace), new Research(plasmaBore), new Research(turbineCondenser)), () -> {
|
node(tankFabricator, Seq.with(new Research(siliconArcFurnace), new Research(plasmaBore), new Research(turbineCondenser)), () -> {
|
||||||
node(UnitTypes.stell, () -> {
|
node(UnitTypes.stell, () -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
node(mechReconstructor, Seq.with(new OnSector(three)), () -> {
|
node(basicReconstructor, Seq.with(new OnSector(three)), () -> {
|
||||||
node(UnitTypes.latum);
|
node(UnitTypes.latum);
|
||||||
|
node(UnitTypes.avert);
|
||||||
|
node(UnitTypes.locus);
|
||||||
|
|
||||||
node(shipReconstructor, Seq.with(new OnSector(three)), () -> {
|
node(tankAssembler, Seq.with(new OnSector(three), new Research(constructor), new Research(atmosphericConcentrator)), () -> {
|
||||||
node(UnitTypes.avert);
|
node(UnitTypes.vanquish, () -> {
|
||||||
|
node(UnitTypes.conquer, Seq.with(tmpNever), () -> {
|
||||||
|
|
||||||
node(tankReconstructor, () -> {
|
});
|
||||||
node(UnitTypes.locus);
|
});
|
||||||
|
|
||||||
node(tankAssembler, Seq.with(new OnSector(three), new Research(constructor), new Research(atmosphericConcentrator)), () -> {
|
node(shipAssembler, Seq.with(new OnSector(five)), () -> {
|
||||||
node(UnitTypes.vanquish, () -> {
|
node(UnitTypes.quell, () -> {
|
||||||
node(UnitTypes.conquer, Seq.with(tmpNever), () -> {
|
node(UnitTypes.disrupt, Seq.with(tmpNever), () -> {
|
||||||
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
node(shipAssembler, Seq.with(new OnSector(five)), () -> {
|
node(mechAssembler, Seq.with(tmpNever), () -> {
|
||||||
node(UnitTypes.quell, () -> {
|
node(UnitTypes.bulwark, () -> {
|
||||||
node(UnitTypes.disrupt, Seq.with(tmpNever), () -> {
|
node(UnitTypes.krepost, Seq.with(tmpNever), () -> {
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
node(mechAssembler, Seq.with(tmpNever), () -> {
|
|
||||||
node(UnitTypes.bulwark, () -> {
|
|
||||||
node(UnitTypes.krepost, Seq.with(tmpNever), () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ public class SectorPresets{
|
|||||||
new TextMarker("The arc furnace needs [accent]sand[] and [accent]graphite[] to create [accent]silicon[].\n[accent]Power[] is also required.", 268f * 8f, 101f * 8f),
|
new TextMarker("The arc furnace needs [accent]sand[] and [accent]graphite[] to create [accent]silicon[].\n[accent]Power[] is also required.", 268f * 8f, 101f * 8f),
|
||||||
new TextMarker("Use [accent]cliff crushers[] to mine sand.", 262f * 8f, 88f * 8f)
|
new TextMarker("Use [accent]cliff crushers[] to mine sand.", 262f * 8f, 88f * 8f)
|
||||||
),
|
),
|
||||||
new BuildCountObjective(Blocks.fabricator, 1).withMarkers(
|
new BuildCountObjective(Blocks.tankFabricator, 1).withMarkers(
|
||||||
new TextMarker("Use [accent]units[] to explore the map, defend buildings, and go on the offensive.\n Research and place a [accent]fabricator[]", 258f * 8f, 116f * 8f)
|
new TextMarker("Use [accent]units[] to explore the map, defend buildings, and go on the offensive.\n Research and place a [accent]fabricator[]", 258f * 8f, 116f * 8f)
|
||||||
),
|
),
|
||||||
new UnitCountObjective(UnitTypes.stell, 1).withMarkers(
|
new UnitCountObjective(UnitTypes.stell, 1).withMarkers(
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ 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, anthicus,
|
merui, latum, anthicus,
|
||||||
bulwark, krepost;
|
bulwark, krepost;
|
||||||
|
|
||||||
//legs, legacy
|
//legs, legacy
|
||||||
@@ -46,7 +46,8 @@ public class UnitTypes{
|
|||||||
|
|
||||||
//air
|
//air
|
||||||
public static @EntityDef({Unitc.class}) UnitType flare, eclipse, horizon, zenith, antumbra,
|
public static @EntityDef({Unitc.class}) UnitType flare, eclipse, horizon, zenith, antumbra,
|
||||||
evoke, avert, obviate;
|
evoke, avert, obviate,
|
||||||
|
osc;
|
||||||
|
|
||||||
//air, legacy
|
//air, legacy
|
||||||
public static @EntityDef(value = {Unitc.class}, legacy = true) UnitType mono;
|
public static @EntityDef(value = {Unitc.class}, legacy = true) UnitType mono;
|
||||||
@@ -2829,6 +2830,35 @@ public class UnitTypes{
|
|||||||
//endregion
|
//endregion
|
||||||
//region erekir - mech
|
//region erekir - mech
|
||||||
|
|
||||||
|
merui = new ErekirUnitType("merui"){{
|
||||||
|
speed = 0.75f;
|
||||||
|
drag = 0.1f;
|
||||||
|
hitSize = 9f;
|
||||||
|
rotateSpeed = 3.5f;
|
||||||
|
health = 700;
|
||||||
|
armor = 5f;
|
||||||
|
|
||||||
|
legCount = 6;
|
||||||
|
legLength = 8f;
|
||||||
|
lockLegBase = true;
|
||||||
|
legContinuousMove = true;
|
||||||
|
legExtension = -2f;
|
||||||
|
legBaseOffset = 3f;
|
||||||
|
maxStretch = 1.1f;
|
||||||
|
maxCompress = 0.2f;
|
||||||
|
legLengthScl = 0.96f;
|
||||||
|
legTrns = 1.1f;
|
||||||
|
legGroupSize = 3;
|
||||||
|
rippleScale = 0.2f;
|
||||||
|
|
||||||
|
legMoveSpace = 1f;
|
||||||
|
hovering = true;
|
||||||
|
|
||||||
|
visualElevation = 0.1f;
|
||||||
|
groundLayer = Layer.legUnit - 1f;
|
||||||
|
|
||||||
|
}};
|
||||||
|
|
||||||
latum = new ErekirUnitType("latum"){{
|
latum = new ErekirUnitType("latum"){{
|
||||||
speed = 0.7f;
|
speed = 0.7f;
|
||||||
drag = 0.1f;
|
drag = 0.1f;
|
||||||
@@ -3300,6 +3330,25 @@ public class UnitTypes{
|
|||||||
//endregion
|
//endregion
|
||||||
//region erekir - flying
|
//region erekir - flying
|
||||||
|
|
||||||
|
osc = new ErekirUnitType("osc"){{
|
||||||
|
//TODO needs hover passability like legs - move into UnitType?
|
||||||
|
hovering = true;
|
||||||
|
visualElevation = 0.1f;
|
||||||
|
|
||||||
|
drag = 0.08f;
|
||||||
|
speed = 2f;
|
||||||
|
rotateSpeed = 6f;
|
||||||
|
|
||||||
|
accel = 0.09f;
|
||||||
|
health = 600f;
|
||||||
|
armor = 3f;
|
||||||
|
hitSize = 7f;
|
||||||
|
engineOffset = 7f;
|
||||||
|
engineSize = 2f;
|
||||||
|
itemCapacity = 0;
|
||||||
|
useEngineElevation = false;
|
||||||
|
}};
|
||||||
|
|
||||||
avert = new ErekirUnitType("avert"){{
|
avert = new ErekirUnitType("avert"){{
|
||||||
lowAltitude = false;
|
lowAltitude = false;
|
||||||
flying = true;
|
flying = true;
|
||||||
|
|||||||
@@ -150,6 +150,9 @@ public class BulletType extends Content implements Cloneable{
|
|||||||
public int fragBullets = 9;
|
public int fragBullets = 9;
|
||||||
public float fragVelocityMin = 0.2f, fragVelocityMax = 1f, fragLifeMin = 1f, fragLifeMax = 1f;
|
public float fragVelocityMin = 0.2f, fragVelocityMax = 1f, fragLifeMin = 1f, fragLifeMax = 1f;
|
||||||
public @Nullable BulletType fragBullet = null;
|
public @Nullable BulletType fragBullet = null;
|
||||||
|
public float bulletInterval = 20f;
|
||||||
|
public int intervalBulletCount = 1;
|
||||||
|
public @Nullable BulletType intervalBullet;
|
||||||
public Color hitColor = Color.white;
|
public Color hitColor = Color.white;
|
||||||
public Color healColor = Pal.heal;
|
public Color healColor = Pal.heal;
|
||||||
public Effect healEffect = Fx.healBlockFull;
|
public Effect healEffect = Fx.healBlockFull;
|
||||||
@@ -423,6 +426,15 @@ public class BulletType extends Content implements Cloneable{
|
|||||||
updateHoming(b);
|
updateHoming(b);
|
||||||
updateWeaving(b);
|
updateWeaving(b);
|
||||||
updateTrailEffects(b);
|
updateTrailEffects(b);
|
||||||
|
updateBulletInterval(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateBulletInterval(Bullet b){
|
||||||
|
if(intervalBullet != null && b.timer.get(2, bulletInterval)){
|
||||||
|
for(int i = 0; i < intervalBulletCount; i++){
|
||||||
|
intervalBullet.create(b, b.x, b.y, Mathf.random(360f));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateHoming(Bullet b){
|
public void updateHoming(Bullet b){
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ public abstract class SaveFileReader{
|
|||||||
"block-loader", "payload-loader",
|
"block-loader", "payload-loader",
|
||||||
"thermal-pump", "impulse-pump",
|
"thermal-pump", "impulse-pump",
|
||||||
"alloy-smelter", "surge-smelter",
|
"alloy-smelter", "surge-smelter",
|
||||||
"steam-vent", "rhyolite-vent"
|
"steam-vent", "rhyolite-vent",
|
||||||
|
"fabricator", "tank-fabricator"
|
||||||
);
|
);
|
||||||
|
|
||||||
public static final ObjectMap<String, String> modContentNameMap = ObjectMap.of(
|
public static final ObjectMap<String, String> modContentNameMap = ObjectMap.of(
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
public boolean canDrown = true, naval = false;
|
public boolean canDrown = true, naval = false;
|
||||||
public float drownTimeMultiplier = 1f;
|
public float drownTimeMultiplier = 1f;
|
||||||
public float engineOffset = 5f, engineSize = 2.5f;
|
public float engineOffset = 5f, engineSize = 2.5f;
|
||||||
|
public boolean useEngineElevation = true;
|
||||||
public @Nullable Color engineColor = null;
|
public @Nullable Color engineColor = null;
|
||||||
public @Nullable Color trailColor;
|
public @Nullable Color trailColor;
|
||||||
public Color engineColorInner = Color.white;
|
public Color engineColorInner = Color.white;
|
||||||
@@ -505,6 +506,10 @@ public class UnitType extends UnlockableContent{
|
|||||||
mechStepParticles = hitSize > 15f;
|
mechStepParticles = hitSize > 15f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(engineSize > 0){
|
||||||
|
engines.add(new UnitEngine(0f, -engineOffset, engineSize, -90f));
|
||||||
|
}
|
||||||
|
|
||||||
if(treadEffect == null){
|
if(treadEffect == null){
|
||||||
treadEffect = new Effect(50, e -> {
|
treadEffect = new Effect(50, e -> {
|
||||||
color(Tmp.c1.set(e.color).mul(1.5f));
|
color(Tmp.c1.set(e.color).mul(1.5f));
|
||||||
@@ -871,7 +876,6 @@ public class UnitType extends UnlockableContent{
|
|||||||
if(trailLength > 0 && !naval && unit.isFlying()){
|
if(trailLength > 0 && !naval && unit.isFlying()){
|
||||||
drawTrail(unit);
|
drawTrail(unit);
|
||||||
}
|
}
|
||||||
if(engineSize > 0) drawEngine(unit);
|
|
||||||
if(engines.size > 0) drawEngines(unit);
|
if(engines.size > 0) drawEngines(unit);
|
||||||
Draw.z(z);
|
Draw.z(z);
|
||||||
if(drawBody) drawBody(unit);
|
if(drawBody) drawBody(unit);
|
||||||
@@ -1010,27 +1014,6 @@ public class UnitType extends UnlockableContent{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawEngine(Unit unit){
|
|
||||||
if(!unit.isFlying()) return;
|
|
||||||
|
|
||||||
float scale = unit.elevation;
|
|
||||||
float offset = engineOffset/2f + engineOffset/2f*scale;
|
|
||||||
|
|
||||||
Draw.color(engineColor == null ? unit.team.color : engineColor);
|
|
||||||
Fill.circle(
|
|
||||||
unit.x + Angles.trnsx(unit.rotation + 180, offset),
|
|
||||||
unit.y + Angles.trnsy(unit.rotation + 180, offset),
|
|
||||||
(engineSize + Mathf.absin(Time.time, 2f, engineSize / 4f)) * scale
|
|
||||||
);
|
|
||||||
Draw.color(engineColorInner);
|
|
||||||
Fill.circle(
|
|
||||||
unit.x + Angles.trnsx(unit.rotation + 180, offset - 1f),
|
|
||||||
unit.y + Angles.trnsy(unit.rotation + 180, offset - 1f),
|
|
||||||
(engineSize + Mathf.absin(Time.time, 2f, engineSize / 4f)) / 2f * scale
|
|
||||||
);
|
|
||||||
Draw.color();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void drawTrail(Unit unit){
|
public void drawTrail(Unit unit){
|
||||||
if(unit.trail == null){
|
if(unit.trail == null){
|
||||||
unit.trail = new Trail(trailLength);
|
unit.trail = new Trail(trailLength);
|
||||||
@@ -1040,16 +1023,18 @@ public class UnitType extends UnlockableContent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void drawEngines(Unit unit){
|
public void drawEngines(Unit unit){
|
||||||
if(!unit.isFlying()) return;
|
float scale = useEngineElevation ? unit.elevation : 1f;
|
||||||
|
|
||||||
|
if(scale <= 0.0001f) return;
|
||||||
|
|
||||||
float scale = unit.elevation;
|
|
||||||
float rot = unit.rotation - 90;
|
float rot = unit.rotation - 90;
|
||||||
|
Color color = engineColor == null ? unit.team.color : engineColor;
|
||||||
|
|
||||||
for(var engine : engines){
|
for(var engine : engines){
|
||||||
Tmp.v1.set(engine.x, engine.y).rotate(rot);
|
Tmp.v1.set(engine.x, engine.y).rotate(rot);
|
||||||
float ex = Tmp.v1.x, ey = Tmp.v1.y;
|
float ex = Tmp.v1.x, ey = Tmp.v1.y;
|
||||||
|
|
||||||
Draw.color(unit.team.color);
|
Draw.color(color);
|
||||||
Fill.circle(
|
Fill.circle(
|
||||||
unit.x + ex,
|
unit.x + ex,
|
||||||
unit.y + ey,
|
unit.y + ey,
|
||||||
|
|||||||