public void Initialize() { DataLoad.InitData(); this.gamePlay = GamePlayTime.Instance; this.gamePlay.Initialize(); PlayerManager.Instance.InstantiatePlayer(); sacrificeCounts = new SacrificeCounts(); this.player = PlayerManager.Instance.player; this.player.sacrificeCounts = this.sacrificeCounts; this.player.LiveChangesEvent += (int arg) => { if (arg <= 0) { GameOver(); } }; enemyManager = EnemyManager.Instance; enemyManager.Init(this.player, this.sacrificeCounts); GameElementConstants.gameState = GameElementConstants.GameState.Start; this.UI = GamePlayManager.Instance; PlayerManager.Instance.player.LiveChangesEvent += this.UI.gamePlay.HUDScreen.playerLivesEventHandler; this.UI.Init(); this.UI.gamePlay.WelcomeScreen.Init(this.UI.gamePlay.TapScreen.TapEvent); this.UI.gamePlay.WelcomeScreen.TapEvent += () => { GameElementConstants.gameState = GameElementConstants.GameState.Playing; EnemyManager.Instance.InstantiateEnemyRandom(); this.match.Init(); this.match.UserInit(); this.gamePlay.PausedEvent += this.match.user.Pause; }; this.match = SelectorMatch.Instance; this.match.MatchedEvent += MatchedEventConnections(); waveMechanic = new SpawnManager(this.enemyManager, this.player); this.gamePlay.SetPause(false); InitializeCombo(); }
public void LaunchPowerUp() { this.selectorMatch = Initializer.Instance.match; this.ritualHud.activePowerUp = true; this.selectorMatch.user.Pause(true); this.selectorMatch.MatchedEvent += RotateSelectors; RotateSelectors(); this.ritualHud.ReduceRitualAmount(); this.ritualHud.activePowerUp = true; this.isActive = true; }
public ThemeRenderElementStyle(ThemeStyle themeStyle, SelectorMatch match) { this.themeStyle = themeStyle; this.match = match; }