// TODO: not dependent on Enemy public override ActionResult Execute(AIPawn pawn) { pawn.Move(pawn.BehaviorState.MoveSelection); return(ActionResult.Success); }
public override ActionResult Execute(AIPawn pawn) { List <Point> points = pawn.PointsInRange; int pointCount = points.Count; if (pointCount <= 0) { return(ActionResult.Failure); } int rand = Random.Range(0, pointCount - 1); Point randPoint = points[rand]; pawn.Move(randPoint); StartCoroutine(WaitForMoveToFinish(pawn)); Debug.Log("RMA Move Coroutine Finished"); return(ActionResult.Success); }