Exemplo n.º 1
0
        /**
         * The default scene constructor.
         */
        public ArenaScene()
            : base()
        {
            instance = this;
            loaded = false;

            // Create the arena controller
            controller = new ArenaController();

            // Define the user actions
            menu = InputAction.Y;
            pause = InputAction.START;

            rotateDown = new InputAction(
                new Buttons[] { Buttons.RightThumbstickDown },
                new Keys[] { Keys.K },
                false
                );
            rotateUp = new InputAction(
                new Buttons[] { Buttons.RightThumbstickUp },
                new Keys[] { Keys.I },
                false
                );

            bgm = SoundUtils.Music.ArenaTheme;
            pauseMenu = new MenuPanel("Pause Menu", new List<MenuItem>() {
                new MenuItem("Resume Game", pause),
                new MenuItem("Main Menu", menu)
            });
        }
Exemplo n.º 2
0
 /// <summary>
 /// The default constructor for the arena controller.
 /// </summary>
 public ArenaController()
 {
     instance = this;
     playerMoved = false;
     score = 0;
     level = 1;
 }
Exemplo n.º 3
0
        public ArenaController(SaveData data)
        {
            instance = this;
            playerMoved = false;
            score = data.score;
            level = data.level;

            generator = new Random(data.seed);
        }
Exemplo n.º 4
0
        public ArenaScene(SaveData data)
            : base()
        {
            instance = this;
            loaded = true;

            // Create the arena controller
            controller = new ArenaController(data);

            // Set the player hp
            List<PlayerSprite> party = PartyUtils.getParty();
            party[0].setHealth(data.partyHealth[0]);
            party[1].setHealth(data.partyHealth[1]);
            party[2].setHealth(data.partyHealth[2]);

            // Define the user actions
            menu = InputAction.Y;
            pause = InputAction.START;

            rotateDown = new InputAction(
                new Buttons[] { Buttons.RightThumbstickDown },
                new Keys[] { Keys.NumPad2 },
                false
                );
            rotateUp = new InputAction(
                new Buttons[] { Buttons.RightThumbstickUp },
                new Keys[] { Keys.NumPad8 },
                false
                );

            bgm = SoundUtils.Music.ArenaTheme;
            pauseMenu = new MenuPanel("Pause Menu", new List<MenuItem>() {
                new MenuItem("Resume Game", pause),
                new MenuItem("Main Menu", menu)
            });
        }