Example #1
0
 public End(IQuickMenu menu, IXleGameControl gameControl, XleSystemState systemState, IGamePersistance gamePersistance)
 {
     this.menu            = menu;
     this.gameControl     = gameControl;
     this.systemState     = systemState;
     this.gamePersistance = gamePersistance;
 }
Example #2
0
 public XleSubMenu(
     IXleGameControl gameControl,
     IMenuRenderer menuRenderer)
 {
     this.gameControl  = gameControl;
     this.menuRenderer = menuRenderer;
 }
Example #3
0
        public CommandExecutor(
            GameState state,
            ICommandList commands,
            IXleGameControl gameControl,
            IXleInput input,
            ISoundMan soundMan,
            IPlayerDeathHandler deathHandler,
            IPlayerAnimator characterAnimator,
            ITextArea textArea)
        {
            gameState           = state;
            this.commands       = commands;
            this.gameControl    = gameControl;
            this.input          = input;
            this.textArea       = textArea;
            this.soundMan       = soundMan;
            this.playerAnimator = characterAnimator;
            this.deathHandler   = deathHandler;

            input.DoCommand += (sender, args) =>
            {
                DoCommand(args.Command, args.KeyString);
            };

            mDirectionMap[Keys.Right] = Direction.East;
            mDirectionMap[Keys.Up]    = Direction.North;
            mDirectionMap[Keys.Left]  = Direction.West;
            mDirectionMap[Keys.Down]  = Direction.South;

            mDirectionMap[Keys.OemOpenBrackets] = Direction.North;
            mDirectionMap[Keys.OemSemicolon]    = Direction.West;
            mDirectionMap[Keys.OemQuotes]       = Direction.East;
            mDirectionMap[Keys.OemQuestion]     = Direction.South;
        }
Example #4
0
 public NumberPicker(
     IXleScreen screen,
     IXleGameControl gameControl,
     ITextArea textArea)
 {
     this.screen      = screen;
     this.gameControl = gameControl;
     this.TextArea    = textArea;
 }
Example #5
0
 public QuickMenuRunner(
     IXleScreen screen,
     ITextArea textArea,
     IXleGameControl gameControl)
 {
     this.screen      = screen;
     this.TextArea    = textArea;
     this.gameControl = gameControl;
 }
Example #6
0
        public static async Task <Keys> WaitForKey(this IXleGameControl gameControl, bool showPrompt, params Keys[] keys)
        {
            Keys result = Keys.None;

            do
            {
                result = await gameControl.WaitForKey(showPrompt);
            } while (!keys.Contains(result));

            return(result);
        }
Example #7
0
        public XleScreenCapture(
            GraphicsDevice graphics,
            IXleRenderer renderer,
            ISceneStack sceneStack,
            IXleGameControl gameControl,
            GameState gameState)
        {
            this.graphics    = graphics;
            this.renderer    = renderer;
            this.sceneStack  = sceneStack;
            this.gameControl = gameControl;
            this.gameState   = gameState;

            this.spriteBatch = new SpriteBatch(graphics);

            keyboard.KeyPress += Keyboard_KeyPress;
        }
 public XlePlayerConsoleCommands(
     GameState gameState,
     ITextArea textArea,
     ICommandExecutor commandExecutor,
     IMapLoader mapLoader,
     IXleGameControl gameControl,
     IMapChanger mapChanger,
     XleSystemState systemState,
     XleOptions options,
     XleData data)
 {
     this.mapLoader       = mapLoader;
     this.GameState       = gameState;
     this.TextArea        = textArea;
     this.commandExecutor = commandExecutor;
     this.gameControl     = gameControl;
     this.systemState     = systemState;
     this.options         = options;
     this.Data            = data;
     this.mapChanger      = mapChanger;
 }
Example #9
0
 public static Task Wait(this IXleGameControl gameControl, int howLong)
 {
     return(gameControl.WaitAsync(howLong));
 }
Example #10
0
 public static Task PlaySoundSync(this IXleGameControl gameControl, LotaSound sound) => gameControl.PlaySoundWait(sound);
Example #11
0
 public Inventory(InventoryScreenRenderer renderer, IXleGameControl gameControl)
 {
     this.renderer    = renderer;
     this.gameControl = gameControl;
 }
Example #12
0
 public Gamespeed(XleSystemState systemState, IXleGameControl gameControl)
 {
     this.systemState = systemState;
     this.gameControl = gameControl;
 }