void Awake() { if (instance != null) { Debug.LogWarning("Multiple player health managers found"); } instance = this; }
public void SetLevel() { mc = MC.instance.gameObject.GetComponent <PlayerMovement>(); npc = NPC.instance.gameObject.GetComponent <PlayerMovement>(); obtainedNPC = false; currentPlayer = mc.transform; mainCamera = Camera.main.GetComponent <CameraFollow>(); playerMentalHealth = PlayerMentalHealth.instance; npc.gameObject.SetActive(false); }
public void SetLevel(string sceneName) { mc = MC.instance.gameObject.GetComponent <PlayerMovement>(); npc = NPC.instance.gameObject.GetComponent <PlayerMovement>(); obtainedNPC = false; currentPlayer = mc.transform; mainCamera = Camera.main.GetComponent <CameraFollow>(); playerMentalHealth = GetComponent <PlayerMentalHealth>(); npc.gameObject.SetActive(false); if (sceneName == "Mood") { followActive = true; } else { followActive = false; } }