/// <summary>
 /// Constructor
 /// </summary>
 /// <param name="gameSceneBrain">The tracker of the just finished game, which contains most recent tracked values</param>
 public GameDebriefingSpawnerManager(GameSceneBrain gameSceneBrain)
     : base()
 {
     this.gameLength = gameSceneBrain.getGameLengthMillis();
     this.bonusPoints = gameSceneBrain.getGameScore();
     this.ragePoints = gameSceneBrain.getRagePoints();
     this.gameDifficulty = Configuration.getCurrentConfiguration().gameDifficulty;
     this.userControlMethod = Configuration.getCurrentConfiguration().userControlMethod;
 }
Пример #2
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="sceneBrain">The active scene brain must be passed,in order to allow the spawner to reference it</param>
        public GameSpawnerManager(GameSceneBrain gameSceneBrain)
            : base()
        {
            this.random = new Random();

            currentConfiguration = Configuration.getCurrentConfiguration();

            this.gameSceneBrain = gameSceneBrain;
            this.minChopSpawnCooldownMillis = this.gameSceneBrain.getMinCutCooldown();
            this.maxChopSpawnCooldownMillis = this.gameSceneBrain.getMaxCutCooldown();
            this.unfriendlyObjCooldown = this.generateNewChopCooldown();
            this.lastUnfriendlyObjSpawned = unfriendlyObjCooldown;
            this.friendlyObjCooldown = random.Next(currentConfiguration.minFriendlyObjectSpawnCooldownTimeMillis, currentConfiguration.maxFriendlyObjectSpawnCoooldownTimeMillis);
            this.lastFriendlyObjSpawned = 0;
            this.gameFirstStart = true;
        }
 public GameStartCountdownLabelObject(double xPosition, double yPosition, GameSceneBrain sceneBrain)
     : base(xPosition, yPosition, "" + (Configuration.getCurrentConfiguration().gameStartCountdownMillis / 1000), Configuration.getCurrentConfiguration().gameStartCountdownMillis)
 {
     this.gameSceneBrain = sceneBrain;
 }
Пример #4
0
        /// <summary>
        /// 
        /// </summary>
        public void newGameButtonActivationDelegate()
        {
            ISceneManager sceneManager = GameLoop.getSceneManager();

            sceneManager.removeGameObjectsByTag(Tags.UI_TAG);
            sceneManager.removeGameObjectsByTag(Tags.USER_TAG);
            sceneManager.removeGameObjectsByTag(Tags.BUTTON_TAG);
            sceneManager.removeGameObjectsByTag(Tags.SOUND_TAG);

            //set the game spawner on the game loop object
            GameSceneBrain gameSceneBrain = new GameSceneBrain();
            GameLoop.getGameLoopSingleton().setSceneBrain(gameSceneBrain);
            GameLoop.getGameLoopSingleton().setSpawnerManager(new GameSpawnerManager(gameSceneBrain));

            //let the madness begin!!! .....WTF?!
        }