Added basic ground AI

This commit is contained in:
Anuken
2020-03-21 10:49:38 -04:00
parent d91ff744f2
commit d673167477
23 changed files with 211 additions and 71 deletions

View File

@@ -36,10 +36,6 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{
y += Mathf.cos(Time.time() + id() * 99, 25f, 0.05f) * Time.delta() * elevation;
}
void moveAt(Vec2 vector){
moveAt(vector, 1f);
}
void moveAt(Vec2 vector, float acceleration){
Vec2 t = Tmp.v3.set(vector).scl(floorSpeedMultiplier()); //target vector
Tmp.v1.set(t).sub(vel).limit(acceleration * vector.len()); //delta vector