public void moveToPosition(Vector2 pos) { if (craft is Drone && (craft as Drone).type == DroneType.Worker && module != null) { (module as TractorAI).GoTo(pos); } else { movement.SetMoveTarget(pos, 4f); setMode(AIMode.Inactive); //(module as PathAI).MoveToPosition(pos); } }
public void Init(Craft craft, IOwner owner = null) { this.owner = owner; this.craft = craft; movement = new AIMovement(this); movement.SetMoveTarget(craft.transform.position); abilityControl = new AIAbilityController(this); }