UHSampleGame.Players.Player.TakeDamage C# (CSharp) Method

TakeDamage() public method

public TakeDamage ( ) : bool
return 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;
        }