This commit is contained in:
Anuken
2020-09-02 16:24:05 -04:00
parent 0cc3bcb121
commit 439c9c5599
21 changed files with 3949 additions and 3955 deletions

View File

@@ -400,7 +400,7 @@ public class UnitTypes implements ContentList{
hovering = true;
allowLegStep = true;
visualElevation = 0.4f;
visualElevation = 0.65f;
groundLayer = Layer.legUnit;
BulletType sapper = new SapBulletType(){{
@@ -474,7 +474,7 @@ public class UnitTypes implements ContentList{
toxopid = new UnitType("toxopid"){{
drag = 0.1f;
speed = 0.6f;
speed = 0.5f;
hitsize = 21f;
health = 23000;
armor = 14f;
@@ -489,7 +489,7 @@ public class UnitTypes implements ContentList{
legBaseOffset = 8f;
landShake = 1f;
legSpeed = 0.1f;
legLengthScl = 1f;
legLengthScl = 0.93f;
rippleScale = 3f;
legSpeed = 0.19f;
@@ -498,7 +498,7 @@ public class UnitTypes implements ContentList{
hovering = true;
allowLegStep = true;
visualElevation = 0.43f;
visualElevation = 0.95f;
groundLayer = Layer.legUnit;
weapons.add(

View File

@@ -261,7 +261,7 @@ public class UnitType extends UnlockableContent{
drawControl(unit);
}
if(unit.isFlying()){
if(unit.isFlying() || visualElevation > 0){
Draw.z(Math.min(Layer.darkness, z - 1f));
drawShadow(unit);
}
@@ -478,7 +478,6 @@ public class UnitType extends UnlockableContent{
}
public <T extends Unit & Legsc> void drawLegs(T unit){
//Draw.z(Layer.groundUnit - 0.02f);
Leg[] legs = unit.legs();
@@ -494,8 +493,9 @@ public class UnitType extends UnlockableContent{
Draw.rect(baseRegion, unit.x, unit.y, rotation);
}
//TODO figure out layering
for(int i = 0; i < legs.length; i++){
//legs are drawn front first
for(int j = legs.length - 1; j >= 0; j--){
int i = (j % 2 == 0 ? j/2 : legs.length - 1 - j/2);
Leg leg = legs[i];
float angle = unit.legAngle(rotation, i);
boolean flip = i >= legs.length/2f;