Simple mining AI

This commit is contained in:
Anuken
2020-08-12 00:08:23 -04:00
parent 8810cf037e
commit 925b1e3057
11 changed files with 150 additions and 68 deletions

View File

@@ -102,7 +102,7 @@ public class Fx{
Tmp.v1.set(e.x, e.y).interpolate(Tmp.v2.set(to), e.fin(), Interp.pow3)
.add(Tmp.v2.sub(e.x, e.y).nor().rotate90(1).scl(Mathf.randomSeedRange(e.id, 1f) * e.fslope() * 10f));
float x = Tmp.v1.x, y = Tmp.v1.y;
float size = Math.min(0.8f + e.rotation / 5f, 2);
float size = 1f;
stroke(e.fslope() * 2f * size, Pal.accent);
Lines.circle(x, y, e.fslope() * 2f * size);

View File

@@ -687,13 +687,17 @@ public class UnitTypes implements ContentList{
//region air support
mono = new UnitType("mono"){{
defaultController = MinerAI::new;
flying = true;
drag = 0.05f;
accel = 0.15f;
speed = 2f;
drag = 0.06f;
accel = 0.12f;
speed = 1.1f;
health = 100;
engineSize = 1.8f;
engineOffset = 5.7f;
itemCapacity = 30;
range = 50f;
mineTier = 1;
mineSpeed = 2.5f;
@@ -704,7 +708,7 @@ public class UnitTypes implements ContentList{
flying = true;
drag = 0.05f;
speed = 2f;
speed = 1.9f;
rotateSpeed = 15f;
accel = 0.1f;
range = 70f;