private void ApplyDamage() { m_TriggerEnterAt = Time.time; Damageable damageable = m_LastHit.GetComponent <Damageable>(); if (damageable) { OnDamageableHit.Invoke(this, damageable); damageable.TakeDamage(this, ignoreInvincibility); if (disableDamageAfterHit) { DisableDamage(); } } else { OnNonDamageableHit.Invoke(this); } }
public void DeathSound(Damager damager, Damageable damageable) { CrowdManager.instance.SetState(CrowdManager.STATES.OOH, 1000); AudioManager.Instance.PlayRandomSfx3D("player_death", ref audio); AudioManager.Instance.PlaySfx(DeathSounds[Random.Range(0, DeathSounds.Length)], "arena_ambience"); }