public void TakeDamage(BaseWeaponItem weaponUsed, int damage, PlayerManager from = null) { m_Data.TakeDamage(damage); if (!m_IsFlashing) { StartCoroutine(DamageFlash()); } TakeDamageSounds(); m_PlayerCanvas.SliderDamage(damage); if (m_Data.CurrHealth <= 0) { if (weaponUsed != null) { weaponUsed.OnKillEnemy(); } Die(); m_AudioManager.Play("Death_Player"); if (from != null) { PKEvent(from.GetID(), GetID()); } else { DropSpotlightEvent(gameObject.transform.position.x, gameObject.transform.position.y); } } }