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;
            }
        }