1 using System.Collections;
2 using System.Collections.Generic;
4 using UnityEngine.SceneManagement;
6 public class MousePos : MonoBehaviour
8 private CheckpointManager checkpointManager;
10 private Cheese cheese;
16 // Start is called before the first frame update
19 checkpointManager = GameObject.FindGameObjectWithTag("CheckpointManager").GetComponent<CheckpointManager>();
20 abyss = GetComponent<Abyss>();
21 health = GetComponent<Health>();
22 cheese = GetComponent<Cheese>();
23 transform.position = checkpointManager.lastCheckpointPos;
24 cheese.cheesecount = checkpointManager.lastCheeseCount;
29 if(abyss.fallenDown || health.mouseHealth <= 0)
31 SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);