public override bool Tick(AIInput g) { g.moveHor(Player.transform.position); g.FG(Player.transform.position.x - g.transform.position.x < 0); return(false); }
// Use this for initialization public override bool Tick(AIInput g) { g.moveHor(Player.transform.position); if (jumpRange != 0) { Vector3 dif = Player.transform.position - g.transform.position; if (Mathf.Abs(dif.x) < jumpRange && dif.y > 1) { g.jump(); } } return(false); }