示例#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);
 }