Example #1
0
        private void Dmg_OnDeath(object sender, HealthChangedArgs e)
        {
            DamageAbleObject dmg = sender as DamageAbleObject;

            npcs.Remove(dmg.Parent as NPC);
            elapsedTimeSinceContact = 10000;
            attacked = false;
            elasedTimeSinceAttacked = 10000f;
        }
Example #2
0
        private void Health_OnHealthChanged(object sender, HealthChangedArgs e)
        {
            if (e.HealthChanger is Projectile)
            {
                hasCover = (e.HealthChanger as Projectile).CrossedCover;
            }

            attacked = true;
            elapsedTimeSinceContact = 0;
        }
Example #3
0
        private void DmgNPC_OnDeath(object sender, HealthChangedArgs e)
        {
            DamageAbleObject dmgObj = sender as DamageAbleObject;

            if (dmgObj != null && dmgObj.Parent != null && dmgObj.Parent is NPC)
            {
                enemies.Remove(dmgObj.Parent as NPC);
            }

            if (enemies.Count == 0)
            {
                enmiesAreDead = true;
            }
        }
Example #4
0
 private void Health_OnHealthChanged(object sender, HealthChangedArgs e)
 {
     attacked = true;
     elasedTimeSinceAttacked = 0f;
 }
Example #5
0
 private void Dmg_OnDeath(object sender, HealthChangedArgs e)
 {
     playerIsDead = true;
 }