public IEnumerator ReloadToCheckpoint(CanvasGroup _canvasGroup, PlayerMovement _charMove) { yield return(new WaitForSecondsRealtime(5.0f)); //string scene = SceneManager.GetActiveScene().name; //SceneManager.LoadScene(scene); _charMove.gameObject.transform.position = checkpointManager.GetCurrentCheckpoint(); _charMove.Enabled = true; _canvasGroup.alpha = 0; //Debug.Log("Reloading " + scene); }
void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.CompareTag("Death")) { character.DestroyEquipmentItems(); character.Interaction.PutDownCarryingObject(); if (sm.Length > 0) { sm[cpm.GetCurrentCheckpoint()].ResetSection(); } character.CenterCamera(character, cpm.GetCurrentCheckpointPosition(), true); //ResetAllSections(); } }