1 using System.Collections;
2 using System.Collections.Generic;
4 using UnityEngine.SceneManagement;
6 public class MousePos : MonoBehaviour
8 private CheckpointManager checkpointManager;
14 // Start is called before the first frame update
17 checkpointManager = GameObject.FindGameObjectWithTag("CheckpointManager").GetComponent<CheckpointManager>();
18 abyss = GetComponent<Abyss>();
19 health = GetComponent<Health>();
20 transform.position = checkpointManager.lastCheckpointPos;
25 if(abyss.fallenDown || health.mouseHealth <= 0)
27 SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);