Beispiel #1
0
        public XleGameControl(
            IXleScreen screen,
            IStatsDisplay statsDisplay,
            IXleWaiter waiter,
            IXleInput input,
            ISoundMan soundMan,
            ITextArea textArea,
            GameState gameState,
            XleSystemState systemState)
        {
            this.screen       = screen;
            this.statsDisplay = statsDisplay;
            this.waiter       = waiter;
            this.input        = input;
            this.soundMan     = soundMan;
            this.textArea     = textArea;
            this.gameState    = gameState;
            this.systemState  = systemState;

            soundMan.ErrorMessage += message =>
            {
                textArea.PrintLine();
                textArea.PrintLine(message);
            };

            textArea.Waiter += WaitAsync;
        }
Beispiel #2
0
        public GamePlayScene(GraphicsDevice device,
                             IXleScreen screen,
                             IXleRunner gameRunner,
                             IXleInput xleInput,
                             IRectangleRenderer rects,
                             ICommandExecutor commandExecutor,
                             XleSystemState systemState,
                             XleRenderer renderer,
                             GameState gameState)
            : base(device, 680, 440)
        {
            this.device          = device;
            this.screen          = screen;
            this.gameRunner      = gameRunner;
            this.xleInput        = xleInput;
            this.rects           = rects;
            this.commandExecutor = commandExecutor;
            this.systemState     = systemState;
            this.renderer        = renderer;
            this.gameState       = gameState;

            this.spriteBatch = new SpriteBatch(device);

            keyboard = new KeyboardEvents();

            keyboard.KeyPress += (_, e) => xleInput.OnKeyPress(e);
            keyboard.KeyDown  += (_, e) => xleInput.OnKeyDown(e.Key);
            keyboard.KeyUp    += (_, e) => xleInput.OnKeyUp(e.Key);
        }
Beispiel #3
0
 public End(IQuickMenu menu, IXleGameControl gameControl, XleSystemState systemState, IGamePersistance gamePersistance)
 {
     this.menu            = menu;
     this.gameControl     = gameControl;
     this.systemState     = systemState;
     this.gamePersistance = gamePersistance;
 }
        public InventoryScreenRenderer(
            IXleRenderer renderer,
            XleData data,
            XleSystemState systemState)
        {
            this.renderer    = renderer;
            this.data        = data;
            this.systemState = systemState;

            UpdateColorScheme();
        }
Beispiel #5
0
        public XleScreen(
            GraphicsDevice graphicsDevice,
            GameState gameState,
            XleSystemState systemState)
        {
            this.graphicsDevice = graphicsDevice;
            this.gameState      = gameState;
            this.systemState    = systemState;

            InitializeScreenSize();
        }
Beispiel #6
0
        public LotaTitleScene(ILotaTitleScreen titleScreen, GraphicsDevice device, IRectangleRenderer rects, XleSystemState systemState)
            : base(device, 680, 440)
        {
            this.titleScreen = titleScreen;
            this.device      = device;
            this.rects       = rects;
            this.systemState = systemState;

            spriteBatch = new SpriteBatch(device);

            keyboard = new KeyboardEvents();

            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;
 }
Beispiel #8
0
 public Gamespeed(XleSystemState systemState, IXleGameControl gameControl)
 {
     this.systemState = systemState;
     this.gameControl = gameControl;
 }