private void Die() { audioSource.clip = dieSound; audioSource.Play(); if (addPoints != null) { addPoints.Invoke(Mathf.CeilToInt(actualUnitStatistic.MaxHP / 2f)); } if (playerDied != null) { playerDied.Invoke(); SaveLoadDataController.ClearData(); } DropLoot(); dead = true; gameObject.SetActive(false); }
public void ResetGame() { SaveLoadDataController.ClearData(); SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); }