public void InitStage() { charSelectCanvas.gameObject.SetActive(false); mainMenuCanvas.SetActive(false); stageWorldUI.SetActive(true); stageUI.SetActive(true); playAreaLeftWall = GameController.gameControl.ui.stageWorldUI.transform.GetChild(2).GetChild(0).gameObject; playAreaRightWall = GameController.gameControl.ui.stageWorldUI.transform.GetChild(2).GetChild(1).gameObject; playAreaTopWall = GameController.gameControl.ui.stageWorldUI.transform.GetChild(2).GetChild(2).gameObject; playAreaBottomWall = GameController.gameControl.ui.stageWorldUI.transform.GetChild(2).GetChild(3).gameObject; special = GameObject.Find("Player").GetComponent <PlayerSpecialAttack>(); UpdateCoreCharge("Day", 0); UpdateCoreCharge("Night", 0); stageUI.SetActive(true); bossHealthSlider.gameObject.SetActive(false); bossTimer.gameObject.SetActive(false); bossNamePanel.SetActive(false); stageEndPanel.SetActive(false); gameOver.SetActive(false); pauseScreen.SetActive(false); dialog.SetActive(false); xp.text = "XP: " + 0 + " / " + GameController.gameControl.stats.xpCap; foreach (GameObject parallax in topLayers) { parallax.GetComponent <TopLayerParallaxController> ().Init(); } foreach (GameObject parallax in bgs) { parallax.GetComponent <ParallaxController> ().Init(); } ResetTopLayer(); }
// Start is called before the first frame update void Start() { playerEnergy = GetComponent <PlayerEnergyLvl>(); specialAttack = GetComponentInChildren <PlayerSpecialAttack>(); }