public void NewGame() { // Get a new BGM GameObject bgm = GameObject.Find("BGM Manager"); Manager manager = bgm.GetComponent <Manager>(); manager.UpdateBGM(); RoutesGenerator routes = this.GetComponent <RoutesGenerator>(); routes.Toggle(); }
public void HandleClick() { // Call Battle function here BattleManager.Instance.ShouldStartBattle(); // Close the choice panel GameObject canvas = GameObject.Find("Canvas"); RoutesGenerator routes = canvas.GetComponent <RoutesGenerator>(); routes.Toggle(); // Update Current Level CurrentLevel currentLevel = canvas.GetComponent <CurrentLevel>(); currentLevel.UpdateLevelInfo(); Debug.Log(title.text); }
public void HandleconfirmButton() { // Create a child clone under the parent Inventory Inventory inventory = Resources.FindObjectsOfTypeAll <Inventory>()[0]; inventory.addModules(this.loot); // Close the tooltip panel this.Toggle(); // Close the loot panel GameObject canvas = GameObject.Find("Canvas"); LootGenerator loot = canvas.GetComponent <LootGenerator>(); loot.Toggle(); // Open the route panel RoutesGenerator routes = canvas.GetComponent <RoutesGenerator>(); routes.Toggle(); }