// Use this for initialization public void Setup(LevelManager _lm) { name = "UI"; _levman = _lm; transform.position = new Vector3(Camera.main.transform.position.x, Camera.main.transform.position.y, -100f); GameEventManager.GameStart += GameStart; GameEventManager.GameOver += GameOver; GameEventManager.Respawn += Respawn; _IngameUI = FETool.findWithinChildren(this.gameObject, "Ingame").GetComponent<IngameUI>(); _GameOverUI = FETool.findWithinChildren(this.gameObject, "GameOver").GetComponent<GameOverUI>(); _EntryUI = FETool.findWithinChildren(this.gameObject, "EntryMenu").GetComponent<EntryUI>(); _EndGameUI = FETool.findWithinChildren(this.gameObject, "EndGame").GetComponent<EndGameUI>(); BottomPos = FETool.findWithinChildren(gameObject, "BottomPos").transform; TopPos = FETool.findWithinChildren(gameObject, "TopPos").transform; _IngameUI.SetupSub(this); _IngameUI.Setup(); _GameOverUI.SetupSub(this); _GameOverUI.Setup(); _EntryUI.SetupSub(this); _EntryUI.Setup(); _EndGameUI.SetupSub(this); _EndGameUI.Setup(); if (_lm._profile.SETUP.GameType == GameSetup.versionType.Demo) { _IngameUI.initPos = IngamePlaceDemo; _GameOverUI.lbInitpos = LeaderboardPlaceDemo; _EndGameUI.lbInitpos = LeaderboardPlaceDemo; } }