示例#1
0
        public MainMenuState(Main game) :
            base(game)
        {
            MainMenu mainMenu = new MainMenu();

            mainMenu.Options.SetOptionFunc(0, ToMainGameState);
            mainMenu.Options.SetOptionFunc(2, OpenOptionsMenu);
            mainMenu.Options.SetOptionFunc(3, Exit);

            menus = new MenuStack();
            menus.CanExitMenuStack = false;
            menus.PushMenu(mainMenu);
            renderer = game.Renderer;
        }
示例#2
0
        public MainGameState(Main game) :
            base(game)
        {
            menus     = new MenuStack();
            pauseMenu = new PauseMenu();
            pauseMenu.Options.SetOptionFunc(1, ExitToMainMenu);
            pauseMenu.Options.SetOptionFunc(2, ExitToDesktop);

            Score = new ScoreManager();

            currentLevel = 1;

            world  = new World(new TileSpriteSheet(Images.GetImage("beach_tileset")));
            player = world.LoadLevel("../../../../Data/the_level");
            world.LoadLevel("../../../../Data/caves");
            camera   = new Camera(player);
            renderer = game.Renderer;

            hudCoin      = new Coin(world);
            hudCoin.Pos  = new Vector2(-9999, -9999);
            locationText = new LocationText("Welcome to Nightvale");
        }
示例#3
0
 public void SetMenuStack(MenuStack menuStack)
 {
     this.menuStack = menuStack;
 }