Esempio n. 1
0
 void PickUp_Update()
 {
     if (!currentPickupTarget.SpawnTag.spawner)
     {
         // Someone else picked it up, so just return to roaming
         fsm.ChangeState(fsm.LastState);
     }
     else if (currentPickupTarget.CanPickup(shipStructure))
     {
         // Close enough to pick the item up!
         bool success = currentPickupTarget.TryAttachToShip(shipStructure);
         // If the pick up doesn't work, then that's fine, just go back to roaming
         fsm.ChangeState(fsm.LastState);
     }
 }