Ejemplo n.º 1
0
        public void Gethit(int demage)
        {
            if (_Hit != null)
            {
                if (demage > 0)
                {
                    _Hit.GetHit(_ID.ToString(), _ID);
                    _HitPoints -= demage;
                    if (_HitPoints < 0)
                    {
                        _HitPoints = 0;
                    }
                }

                if (_GotHit != null)
                {
                    _GotHit(_HitPoints);
                }
            }
            if (_HitPoints <= 0)
            {
                if (_SendWinner != null)
                {
                    _SendWinner(_Opponent);
                }
            }
        }