Exemplo n.º 1
0
        public void Initialize()
        {
            uint spriteCapacity      = 500;
            uint drawHelpersCapacity = 400;

            graphics = new GraphicsContext();

            StartUpMethods.SetUpDirector(spriteCapacity, drawHelpersCapacity, graphics);

            var uitransition = new CrossFadeTransition();



            Start = new StartScreen();


            startui = new StartScreenUI();

            startui.Transition = uitransition;

            Director.Instance.RunWithScene(Start, true);

            StartUpMethods.SetUpUI(graphics, startui);
        }
Exemplo n.º 2
0
        public static void ReplaceScene(int scene)
        {
            var game = Game.Instance;


            switch (scene)
            {
            case (int)GE2D.START:

                var start = game.Start;
                start = new StartScreen();
                Director.Instance.ReplaceScene(start);
                break;

            case (int)GE2D.WORLD:
                game.World = new WorldMap();
                var world = game.World;
                Director.Instance.ReplaceScene(world);
                break;

            case (int)GE2D.FIRST:
                game.FirstScene = new FirstScene();
                Director.Instance.ReplaceScene(game.FirstScene);
                break;


            case (int)GE2D.MINE:
                game.Mine = new Mine();

                Director.Instance.ReplaceScene(game.Mine);
                break;

            case (int)GE2D.HILL:
                game.Hilltop = new Hilltop();

                Director.Instance.ReplaceScene(game.Hilltop);
                break;

            case (int)GE2D.GOODTOWN:
                game.GoodTown = new GoodTown();
                Director.Instance.ReplaceScene(game.GoodTown);
                break;

            case (int)GE2D.DESTOWN:
                game.DestroyedTown = new DestroyedTown();

                Director.Instance.ReplaceScene(game.DestroyedTown);
                break;

            case (int)GE2D.FORT:

                game.Fortress = new Fortress();
                Director.Instance.ReplaceScene(game.Fortress);
                break;

            case (int)GE2D.DUNGEON:
                game.Dungeon = new Dungeon();
                Director.Instance.ReplaceScene(game.Dungeon);
                break;

            case (int)GE2D.FINAL:

                game.FinalBattle = new FinalBattle();
                Director.Instance.ReplaceScene(game.FinalBattle);
                break;

            case (int)GE2D.BLACKSMITH:
                game.BlackSmith = new BlackSmith();
                Director.Instance.ReplaceScene(game.BlackSmith);
                break;
            }
        }