Movement
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package mindustry.entities.def;
|
||||
|
||||
import arc.*;
|
||||
import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.util.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
@@ -71,6 +73,14 @@ abstract class UnitComp implements Healthc, Velc, Statusc, Teamc, Itemsc, Hitbox
|
||||
return type;
|
||||
}
|
||||
|
||||
public void lookAt(float angle){
|
||||
rotation = Angles.moveToward(rotation, angle, type.rotateSpeed);
|
||||
}
|
||||
|
||||
public void lookAt(Position pos){
|
||||
lookAt(angleTo(pos));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
//apply knockback based on spawns
|
||||
|
||||
Reference in New Issue
Block a user