This commit is contained in:
Anuken
2020-05-26 13:20:08 -04:00
parent 5c4ce00dec
commit ddb3afc255
3 changed files with 19 additions and 23 deletions
+14 -19
View File
@@ -1,6 +1,7 @@
package mindustry.content; package mindustry.content;
import arc.graphics.*; import arc.graphics.*;
import arc.math.*;
import arc.struct.*; import arc.struct.*;
import mindustry.annotations.Annotations.*; import mindustry.annotations.Annotations.*;
import mindustry.ctype.*; import mindustry.ctype.*;
@@ -71,30 +72,24 @@ public class UnitTypes implements ContentList{
cix = new UnitType("cix"){{ cix = new UnitType("cix"){{
drag = 0.1f; drag = 0.1f;
speed = 0.8f; speed = 0.8f;
hitsize = 11f; hitsize = 9f;
health = 140; health = 140;
legCount = 6; legCount = 6;
rotateShooting = false; rotateShooting = false;
weapons.add( for(boolean b : Mathf.booleans){
new Weapon("missiles-mount"){{ weapons.add(
reload = 20f; new Weapon("missiles-mount"){{
x = 4f; reload = 20f;
rotate = true; x = 4f * Mathf.sign(b);
mirror = false; rotate = true;
shake = 1f; mirror = false;
bullet = Bullets.missileSwarm; flipSprite = !b;
}}, shake = 1f;
new Weapon("missiles-mount"){{ bullet = Bullets.missileSwarm;
reload = 20f; }});
x = -4f; }
rotate = true;
mirror = false;
flipSprite = true;
shake = 1f;
bullet = Bullets.missileSwarm;
}});
}}; }};
titan = new UnitType("titan"){{ titan = new UnitType("titan"){{
@@ -42,7 +42,7 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Flyingc, Unitc{
} }
} }
float moveSpeed = 0.1f; float moveSpeed = type().legSpeed;
int div = Math.max(legs.length / 2, 2); int div = Math.max(legs.length / 2, 2);
float moveSpace = legLength / 1.6f / (div / 2f); float moveSpace = legLength / 1.6f / (div / 2f);
@@ -69,7 +69,7 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Flyingc, Unitc{
} }
float movespace = 360f / legs.length / 4f; float movespace = 360f / legs.length / 4f;
float trns = vel().len() * 12.5f * div/1.5f; float trns = vel().len() * 12.5f * div/1.5f * type().legTrns;
Tmp.v4.trns(rotation, trns); Tmp.v4.trns(rotation, trns);
+3 -2
View File
@@ -39,10 +39,11 @@ public class UnitType extends UnlockableContent{
public boolean targetAir = true, targetGround = true; public boolean targetAir = true, targetGround = true;
public boolean faceTarget = true, rotateShooting = true, isCounted = true, lowAltitude = false; public boolean faceTarget = true, rotateShooting = true, isCounted = true, lowAltitude = false;
public boolean canBoost = false; public boolean canBoost = false;
public int legCount = 4;
public float legLength = 24f;
public float sway = 1f; public float sway = 1f;
public int legCount = 4;
public float legLength = 24f, legSpeed = 0.1f, legTrns = 1f;
public int itemCapacity = 30; public int itemCapacity = 30;
public int drillTier = -1; public int drillTier = -1;
public float buildSpeed = 1f, mineSpeed = 1f; public float buildSpeed = 1f, mineSpeed = 1f;