Exemple #1
0
        /////////////////
        ///// DEATH /////
        /////////////////

        /// <summary>
        ///
        /// </summary>
        /// <param name="damagable"></param>
        public void OnDeath(Damagable damagable)
        {
            if (Checkpoint && Checkpoint.Active)
            {
                Checkpoint.Respawn(this);

                damagable.Revive();
            }
            else
            {
                SceneManager.LoadScene(SceneManager.GetActiveScene().name);
            }
        }
Exemple #2
0
    /////////////////
    ///// DEATH /////
    /////////////////

    /**
     * 
     */
    public void OnDeath(Damagable damagable)
    {
		if (checkpoint && checkpoint.active)
        {
			checkpoint.Respawn(this);

			damagable.Revive();
		}
        else
        {
			SceneManager.LoadScene(SceneManager.GetActiveScene().name);
		}
	}