コード例 #1
0
 public virtual void Die()
 {
     if (Dead)
     {
         return; //can't die twice
     }
     movement.CurrentDirection = new Vector2(0, 0);
     selection.Deselect();
     soundPlayer.PlayDyingSound();
     dyingAnimation.Start();
     TurnOffComponents();
     TurnOffChildGameObjects();
     Dead = true;
     Debug.Log("DEAD!");
 }
コード例 #2
0
 public void RemoveFromSelection(UnitSelection unitSelection)
 {
     unitSelection.Deselect();
     SelectedUnits.Remove(unitSelection);
 }