コード例 #1
0
 public CursorUpdater(GameModel game, Cursor cursor, MouseInputs mouseInputs)
 {
     _cursorToUpdate = cursor;
     _mouseInputs    = mouseInputs;
     _cameraUpdater  = game.CameraUpdater;
     game.AddToUpdaters(this);
 }
コード例 #2
0
ファイル: GeneratorUpdater.cs プロジェクト: hedocode/GameBase
 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
ファイル: InputsManager.cs プロジェクト: hedocode/GameBase
        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);
 }