Пример #1
0
 public CursorUpdater(GameModel game, Cursor cursor, MouseInputs mouseInputs)
 {
     _cursorToUpdate = cursor;
     _mouseInputs    = mouseInputs;
     _cameraUpdater  = game.CameraUpdater;
     game.AddToUpdaters(this);
 }
Пример #2
0
 public GeneratorUpdater(GameModel game)
 {
     _game     = game;
     _toRemove = new List <IGenerator>();
     _toUpdate = new List <IGenerator>();
     game.AddToUpdaters(this);
 }
Пример #3
0
 /*-------------*/
 /* CONSTRUCTOR */
 /*-------------*/
 public SpriteUpdater(GameModel game)
 {
     _spriteDrawer    = game.SpriteDrawer;
     _effectsToAdd    = new List <IDrawableEffectOverTime>();
     _effectsToRemove = new List <IDrawableEffectOverTime>();
     _spritesToRemove = new List <ISprite>();
     ToUpdate         = new List <ISprite>();
     game.AddToUpdaters(this);
 }
Пример #4
0
        /*-------------*/
        /* CONSTRUCTOR */
        /*-------------*/

        public TextSpriteUpdater(GameModel game)
        {
            _effectsToAdd    = new List <IDrawableEffectOverTime>();
            _effectsToRemove = new List <IDrawableEffectOverTime>();

            _spriteFonts = new Dictionary <string, SpriteFont>();

            ToUpdate = new List <ITextSprite>();
            game.AddToUpdaters(this);
        }
Пример #5
0
        public InputsManager(GameModel game)
        {
            _mouseInputs    = new MouseInputs();
            _gamePadInputs  = new GamePadInputs();
            _keyboardInputs = new KeyboardInputs();
            _inputs.Add(_mouseInputs);
            _inputs.Add(_gamePadInputs);
            _inputs.Add(_keyboardInputs);

            _oldButtonsState = new Dictionary <string, bool>();
            _buttonsState    = new Dictionary <string, bool>();

            _game = game;
            _game.AddToUpdaters(this);
            _game.AddToContentLoader(this);
        }
Пример #6
0
 public CameraUpdater(GameModel game)
 {
     _game = game;
     _game.AddToUpdaters(this);
 }