Example #1
0
 public void    TraceAttack(CDamageInfo info)
 {
     if (!HasFlag(FL_NODAMAGE))
     {
         m_iHealth -= info.GetDamage();
         CalculateDeath();
         OnTakeDamage(info);
         if (IsDead())
         {
             OnKilled(info);
             info.GetAttacker().OnKilledOther(info);
         }
         else
         {
             OnTakeDamageAlive(info);
         }
     }
 }
Example #2
0
 public void    OnKilledOther(CDamageInfo info)
 {
 }
Example #3
0
        }                                                               //called after OnTakeDamage(..), only if still alive

        public void    OnKilled(CDamageInfo info)
        {
            CalculateNextRespawnTime(); obj().SetActive(false);
        }
Example #4
0
        }                                                          //Called after damage is subtracted from health

        public void    OnTakeDamageAlive(CDamageInfo info)
        {
        }                                                               //called after OnTakeDamage(..), only if still alive
Example #5
0
 public void    OnTakeDamage(CDamageInfo info)
 {
 }                                                          //Called after damage is subtracted from health
Example #6
0
        public void    Kill()
        {
            CDamageInfo info = new CDamageInfo(m_iHealth, this, GetPosition());

            TraceAttack(info);
        }