Example #1
0
        /// <summary>
        /// Creates the requested game state entity
        /// </summary>
        /// <param name="gameState">State we want to create</param>
        /// <returns>The requested game state entity</returns>
        internal GameStateEntity CreateState(Enumerators.GameStateTypes gameState)
        {
            switch (gameState)
            {
            case Enumerators.GameStateTypes.START_GAMEPLAY:
                return(_gamePlayFactory.Create());

            case Enumerators.GameStateTypes.MENU:
                return(_menuStateFactory.Create());
            }

            return(null);
        }
Example #2
0
        /// <summary>
        /// Creates the requested game state entity
        /// </summary>
        /// <param name="gameState">State we want to create</param>
        /// <returns>The requested game state entity</returns>
        internal GameStateEntity CreateState(GameState gameState)
        {
            switch (gameState)
            {
            case GameState.Menu:
                return(_menuFactory.Create());

            case GameState.Gameplay:
                return(_gameplayFactory.Create());

            case GameState.GameOver:
                return(_gameOverFactory.Create());

            case GameState.Victory:
                return(_victoryFactory.Create());
            }

            throw Assert.CreateException("Code should not be reached");
        }