private void Start() { input = player.GetComponent <InputComponent>(); input.OnPause += PauseGame; statVendor = GameObject.Find("Stat Vendor NPC").GetComponent <StatVendor>(); StartCoroutine(UpdateUI()); //pausePanel = GameObject.Find("PausePanel"); }
// When a new scene is loaded, run this code void OnLevelFinishedLoading(Scene scene, LoadSceneMode mode) { player.GetComponent <Inventory>().PopulateInventory(); if (scene.name.Equals("Hub")) { statVendor = GameObject.Find("Stat Vendor NPC").GetComponent <StatVendor>(); } }