aduros / flambe

Rapidly cook up games for HTML5, Flash, Android, and iOS.
https://github.com/aduros/flambe/wiki
MIT License
745 stars 118 forks source link

Add Entity/Component iterator #369

Closed markknol closed 7 years ago

markknol commented 8 years ago

Allows iteration on Entity and Component using Haxe's for-loop

loop through entities:

for(child in entity) {
  doStuff(child);
}

loop through components:

for(component in entity.firstComponent) {
  doStuff(component);
}