// ***************************************************************************************************************** // ***************************************************************************************************************** #region Unity Functions // ***************************************************************************************************************** // Called once per frame void Update() { // If the health pool has died... if (m_healthPool.IsAlive() == false) { // Reload the current scene SceneManager.LoadScene(m_scenename); } }
// ***************************************************************************************************************** // ***************************************************************************************************************** #region Unity Functions // ***************************************************************************************************************** // Called once per frame void Update() { // If the health pool has died... if (m_healthPool.IsAlive() == false) { // Attempt to add to the CurrencyPouch m_currencyPouch.AddCurrency(m_currencyType, m_amount); } }
// ***************************************************************************************************************** // ***************************************************************************************************************** #region Unity Functions // ***************************************************************************************************************** // Called once per frame void Update() { // If the health pool has died... if (m_healthPool.IsAlive() == false) { m_lives.LoseLife(); // Disable self so we don't do this twice! enabled = false; } }
// ***************************************************************************************************************** // ***************************************************************************************************************** #region Unity Functions // ***************************************************************************************************************** // Called once per frame void Update() { // If the health pool has died... if (m_healthPool.IsAlive() == false) { // Get the current scene string currentScene = SceneManager.GetActiveScene().name; // Reload the current scene SceneManager.LoadScene(currentScene); } }