Beispiel #1
0
 public override void Execute(float deltaTime)
 {
     if (GameScene.GetCurrentGameSceneState() == GameState.SceneName.Player1 ||
         GameScene.GetCurrentGameSceneState() == GameState.SceneName.Player2)
     {
         UFOManager.ActivateUFO();
     }
 }
Beispiel #2
0
        private void SpawnUFO()
        {
            int random = UFOManager.GetRandom().Next(7, 10);

            this.pUFO = UFOManager.ActivateUFO(GameManager.GetCollisionBoxes());
            TimerManager.Add(TimerEventName.PlayUFOSound, TimerManager.GetCurrentTime() + 0.2f, 0.2f, new StartUFOSoundCommand());
            TimerManager.Add(TimerEventName.UFOSpawnBomb, TimerManager.GetCurrentTime() + (float)UFOManager.GetRandom().Next(1, 6), TimerManager.GetCurrentTime() + (float)UFOManager.GetRandom().Next(1, 6), new UFOBombSpawnEvent());
        }