Ejemplo n.º 1
0
 public XleInput(
     IXleScreen screen,
     GameState gameState)
 {
     this.screen    = screen;
     this.gameState = gameState;
 }
Ejemplo n.º 2
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;
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
0
 public NumberPicker(
     IXleScreen screen,
     IXleGameControl gameControl,
     ITextArea textArea)
 {
     this.screen      = screen;
     this.gameControl = gameControl;
     this.TextArea    = textArea;
 }
Ejemplo n.º 5
0
 public QuickMenuRunner(
     IXleScreen screen,
     ITextArea textArea,
     IXleGameControl gameControl)
 {
     this.screen      = screen;
     this.TextArea    = textArea;
     this.gameControl = gameControl;
 }
Ejemplo n.º 6
0
        public TextArea(
            IXleScreen screen,
            GameState gameState)
        {
            this.gameState = gameState;
            this.screen    = screen;

            for (int i = 0; i < lines.Length; i++)
            {
                lines[i] = new TextLine(this);
            }
        }
Ejemplo n.º 7
0
 public XleRenderer(
     ICommandList commands,
     IXleImages images,
     IPlayerAnimator playerAnimator,
     IXleScreen screen,
     IRectangleRenderer rects,
     IStatsDisplay statsDisplay)
 {
     this.commands       = commands;
     this.images         = images;
     this.Screen         = screen;
     this.rects          = rects;
     this.playerAnimator = playerAnimator;
     this.statsDisplay   = statsDisplay;
 }
Ejemplo n.º 8
0
 public MapChanger(
     GameState gameState,
     IXleScreen screen,
     IXleImages images,
     ITextArea textArea,
     ICommandList commands,
     IMapLoader mapLoader,
     IMuseumCoinSale museumCoinSale)
 {
     this.gameState      = gameState;
     this.screen         = screen;
     this.images         = images;
     this.textArea       = textArea;
     this.commands       = commands;
     this.mapLoader      = mapLoader;
     this.museumCoinSale = museumCoinSale;
 }