public AlertScreen(bGame game, bGameState nextWorld, Func<GameTime, SpriteBatch, Matrix, int> renderAlert)
     : base()
 {
     this.game = game;
     this.renderAlert = renderAlert;
     this.nextWorld = nextWorld;
 }
Exemplo n.º 2
0
 public Title(bGame game, bGameState nextWorld = null)
     : base()
 {
     this.game = game;
     if (nextWorld == null)
         nextWorld = new Ring(game);
     this.nextWorld = nextWorld;
 }
Exemplo n.º 3
0
        public void actuallyChangeWorld(bGameState newWorld)
        {
            if (newWorld != null)
            {
                if (world != null)
                    world.end();

                world = newWorld;
                world.game = this;

                newWorld.init();

                requestedWorldChange = false;
                nextWorld = null;
            }
            else
            {
                Console.WriteLine("An invalid attemp to change world occured:");
                Console.WriteLine("Request: " + (requestedWorldChange ? "issued " : "not issued; ") +
                                  "Valid instance: " + ((nextWorld != null) ? "yes" : "no"));
            }
        }
Exemplo n.º 4
0
 public void changeWorld(bGameState newWorld, Transition transition)
 {
     if (world == null)
         actuallyChangeWorld(newWorld);
     else
     {
         nextWorld = newWorld;
         requestedWorldChange = true;
         requestedTransition = transition;
     }
 }
Exemplo n.º 5
0
 public void changeWorld(bGameState newWorld)
 {
     changeWorld(newWorld, defaultTransition());
 }
Exemplo n.º 6
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            if (!dataManager.loadGame())
                dataManager.startNewGame();

            // TODO: Create Initial Level
            worldMap = new GameWorld(this);
            changeWorld(worldMap);

            base.Initialize();
        }