public void Kill() { var minDeathChance = PlayerQuirks.GetCharactheristic(EPlayerCharachteristic.Empathy) + PlayerQuirks.GetCharactheristic(EPlayerCharachteristic.Prowlness) + PlayerQuirks.GetCharactheristic(EPlayerCharachteristic.Reflection); if (Random.Range(Mathf.Clamp(minDeathChance, 0, 100), 100) > DeathPossibility) { StartCoroutine(DeathEffect()); } else { SceneManager.LoadScene(0); } }
public void Kill() { var minDeathChance = PlayerQuirks.GetCharactheristic(EPlayerCharachteristic.Empathy) + PlayerQuirks.GetCharactheristic(EPlayerCharachteristic.Prowlness) + PlayerQuirks.GetCharactheristic(EPlayerCharachteristic.Reflection); if (UnityEngine.Random.Range(Mathf.Clamp(minDeathChance, 0, 100), 100) > DeathPossibility) { // StartCoroutine(DeathEffect()); PlayerBehaviour.CurrentPlayer.transform.position = _latestCheckpoint.position; } else { SceneManager.LoadScene(0); } Death(); }