示例#1
0
 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);
     }
 }
示例#2
0
 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);
 }