Movement
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package mindustry.entities.def;
|
||||
|
||||
import arc.util.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
@@ -9,6 +10,14 @@ abstract class LegsComp implements Posc, Flyingc, Hitboxc, DrawLayerGroundUnderc
|
||||
|
||||
float baseRotation, walkTime;
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
if(vel().len() > 0.5f){
|
||||
baseRotation = vel().angle();
|
||||
walkTime += Time.delta()*vel().len()/1f;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawGroundUnder(){
|
||||
type().drawLegs(this);
|
||||
|
||||
Reference in New Issue
Block a user