void Awake()
 {
     if (instance != null)
     {
         Debug.LogWarning("Multiple player health managers found");
     }
     instance = this;
 }
예제 #2
0
        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);
        }
예제 #3
0
        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;
            }
        }