예제 #1
0
        public PauseMenu()
        {
            pixelTextureData = ResourceManager.GetTextureData("white_pixel");
            options          = new List <string> {
                "Resume",
                "Exit"
            };
            currentOptionIndex = 0;

            inputButtonListener = new InputButtonListener(new Dictionary <InputButton, ButtonEventHandlers> {
                { InputButton.Down, new ButtonEventHandlers(down: nextOption) },
                { InputButton.Up, new ButtonEventHandlers(down: previousOption) },
                { InputButton.A, new ButtonEventHandlers(up: selectOption) }
            });
        }
        public PauseMenu()
        {
            pixelTextureData = ResourceManager.GetTextureData("white_pixel");
            options = new List<string> {
                "Resume",
                "Exit"
            };
            currentOptionIndex = 0;

            inputButtonListener = new InputButtonListener(new Dictionary<InputButton, ButtonEventHandlers> {
                { InputButton.Down, new ButtonEventHandlers(down: nextOption) },
                { InputButton.Up, new ButtonEventHandlers(down: previousOption) },
                { InputButton.A, new ButtonEventHandlers(up: selectOption) }
            });
        }
        protected Scene()
        {
            Entities = new List<Entity>();
            SceneryEntities = new List<Scenery>();
            entitiesToAdd = new List<Entity>();
            finished = false;

            inputButtonListener = new InputButtonListener(new Dictionary<InputButton, ButtonEventHandlers> {
                { InputButton.Pause, new ButtonEventHandlers(up: pause) }
            });

            nextScene = this;
            if (Current == null)
                pushNextScene();
        }
예제 #4
0
        protected Scene()
        {
            Entities        = new List <Entity>();
            SceneryEntities = new List <Scenery>();
            entitiesToAdd   = new List <Entity>();
            finished        = false;

            inputButtonListener = new InputButtonListener(new Dictionary <InputButton, ButtonEventHandlers> {
                { InputButton.Pause, new ButtonEventHandlers(up: pause) }
            });

            nextScene = this;
            if (Current == null)
            {
                pushNextScene();
            }
        }