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; }
private void Health_OnHealthChanged(object sender, HealthChangedArgs e) { if (e.HealthChanger is Projectile) { hasCover = (e.HealthChanger as Projectile).CrossedCover; } attacked = true; elapsedTimeSinceContact = 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; } }
private void Health_OnHealthChanged(object sender, HealthChangedArgs e) { attacked = true; elasedTimeSinceAttacked = 0f; }
private void Dmg_OnDeath(object sender, HealthChangedArgs e) { playerIsDead = true; }