Exemplo n.º 1
0
		public AGSRendererLoop (Resolver resolver, IGame game, IImageRenderer renderer, IInput input, AGSWalkBehindsMap walkBehinds,
			IAGSRoomTransitions roomTransitions, IGLUtils glUtils)
		{
            this._glUtils = glUtils;
			this._resolver = resolver;
			this._walkBehinds = walkBehinds;
            this._game = game;
			this._gameState = game.State;
			this._renderer = renderer;
			this._input = input;
			this._comparer = new RenderOrderSelector ();
			this._roomTransitions = roomTransitions;
			_roomTransitions.Transition = new RoomTransitionInstant ();
		}
Exemplo n.º 2
0
 public AGSRendererLoop(Resolver resolver, IGame game, IImageRenderer renderer, IInput input, AGSWalkBehindsMap walkBehinds,
                        IAGSRoomTransitions roomTransitions, IGLUtils glUtils)
 {
     this._glUtils               = glUtils;
     this._resolver              = resolver;
     this._walkBehinds           = walkBehinds;
     this._game                  = game;
     this._gameState             = game.State;
     this._renderer              = renderer;
     this._input                 = input;
     this._comparer              = new RenderOrderSelector();
     this._roomTransitions       = roomTransitions;
     _roomTransitions.Transition = new RoomTransitionInstant();
 }
Exemplo n.º 3
0
        public AGSDisplayList(IGameState gameState, IInput input, AGSWalkBehindsMap walkBehinds,
                              IImageRenderer renderer, IGameEvents events, IAGSRoomTransitions roomTransitions)
        {
            _roomTransitions     = roomTransitions;
            _gameState           = gameState;
            _input               = input;
            _renderer            = renderer;
            _walkBehinds         = walkBehinds;
            _cache               = new ConcurrentDictionary <IViewport, List <IObject> >();
            _viewportSubscribers = new ConcurrentDictionary <IViewport, ViewportSubscriber>();
            _bindings            = new ConcurrentDictionary <string, List <API.IComponentBinding> >();
            _comparer            = new RenderOrderSelector();
            events.OnRepeatedlyExecute?.Subscribe(onRepeatedlyExecute);

            gameState.UI.OnListChanged.Subscribe(onUiChanged);
            subscribeObjects(gameState.UI);
            subscribeRoom();
            onSomethingChanged();
        }