public AlertScreen(bGame game, bGameState nextWorld, Func<GameTime, SpriteBatch, Matrix, int> renderAlert) : base() { this.game = game; this.renderAlert = renderAlert; this.nextWorld = nextWorld; }
public Title(bGame game, bGameState nextWorld = null) : base() { this.game = game; if (nextWorld == null) nextWorld = new Ring(game); this.nextWorld = nextWorld; }
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")); } }
public void changeWorld(bGameState newWorld, Transition transition) { if (world == null) actuallyChangeWorld(newWorld); else { nextWorld = newWorld; requestedWorldChange = true; requestedTransition = transition; } }
public void changeWorld(bGameState newWorld) { changeWorld(newWorld, defaultTransition()); }
/// <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(); }