Skip to content

vrobel/robotlegs-utilities-LazyMediator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robotlegs utility LazyMediator for better performance in games.

How to use

  • Override the mediatorMap getter method in context to:
 return _mediatorMap || (_mediatorMap = new LazyMediatorMap(contextView, injector, reflector));
  • In the constructor of view classes add:
 new LazyMediatorActivator(this);

Why it

  • LazyMediatorMap don’t listen events of display list and check every added/removed view.

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.

About

Robotlegs utility LazyMediator to improve MediatorMap performance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ActionScript 100.0%