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!"); }
public void RemoveFromSelection(UnitSelection unitSelection) { unitSelection.Deselect(); SelectedUnits.Remove(unitSelection); }