UHSampleGame.Players.Player.TakeDamage C# (CSharp) Метод

TakeDamage() публичный Метод

public TakeDamage ( ) : bool
Результат bool
        public bool TakeDamage()
        {
            Health--;
            //HealthString = Health.ToString();
            if (Health <= 0)
            {
                //Event if died??

                IsDead = true;
                if (PlayerCollection.CheckGameWin())
                    return true;

                PlayerCollection.UpdateTargetPlayers(PlayerNum);
                UnitCollection.SetOtherUnitsToNewTarget(PlayerNum);
                UnitCollection.SetAllUnitsImmovable(PlayerNum);
                TowerCollection.SetAllNoShoot(PlayerNum);
            }
            return false;
        }