예제 #1
0
 public MenuPanel makeMenuPanel()
 {
     List<MenuItem> items = new List<MenuItem>();
     List<InputAction> actions = new List<InputAction>() { InputAction.Y, InputAction.X, InputAction.A };
     for(int i=0; i<skills.Count; ++i)
         items.Add(skills[i].makeMenuItem(actions[i]));
     MenuPanel result = new MenuPanel(rawStats.name, items);
     return result;
 }
예제 #2
0
        public MainMenuScene()
            : base()
        {
            // Initialize the player actions
            newGame = InputAction.A;
            loadGame = InputAction.X;
            scores = InputAction.Y;

            // Create the actual Main Menu panel
            mainMenu = new MenuPanel("Main Menu", new List<MenuItem>()
            {
                new MenuItem("New Game", newGame),
                new MenuItem("Load Game", loadGame),
                new MenuItem("High Scores", scores)
            });

            // Create a high scores file if it doesn't exist
            save = SaveUtils.getInstance();
        }
예제 #3
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)
            });
        }
예제 #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)
            });
        }