Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/evan-liu/robotlegs-utilities-LazyMediator

Robotlegs utility LasyMediator for better performance in games.
https://github.com/evan-liu/robotlegs-utilities-LazyMediator

Last synced: 2 months ago
JSON representation

Robotlegs utility LasyMediator for better performance in games.

Awesome Lists containing this project

README

        

h2. Robotlegs utility LazyMediator for better performance in games.

h3. How to use

* Override the *_mediatorMap_* getter method in *_context_* to:

 return _mediatorMap || (_mediatorMap = new LazyMediatorMap(contextView, injector));

* In the constructor of view classes add:

 new LazyMediatorActivator(this);

h3. Why it

* *_LazyMediatorMap_* don't listen events of display list and check every added/removed view.

h3. How it works

* *_LazyMediatorActivator_* dispatchs *_LazyMediatorEvent_* when the view is added/removed from stage.
* *_LazyMediatorMap_* listen to the *_LazyMediatorEvent_* from *_contextView_* then check the view.

Current version is compatible with Robotlegs v1.4.0+ because _active field (used in LazyMediatorMap) was removed there.