-
Notifications
You must be signed in to change notification settings - Fork 6
Iterating
Mark Knol edited this page Oct 18, 2017
·
3 revisions
You can use the parent
, firstChild
, next
and firstComponent
fields to iterate over the hierarchy.
var component = entity.firstComponent;
while (child != null)
{
var next = component.next;
// do something with child here
doSomethingWith(component);
component = next;
}
var child = entity.firstChild;
while (child != null)
{
var next = child.next;
// do something with child here
doSomethingWith(child);
child = next;
}
As you may noticed, Flambe uses a linked-list to define the hierarchy.
Documentation guide for Flambe - Targeted to version 4.0+
Flambe | Installation | Demo projects | Showcase | API Reference | Forum
Flambe is MIT licensed and available for free. Feel free to contribute!
- Home / Installation
- Entity / Components
- Core
- Assets
- Publish your game
- Other
- Editors
- Plugins, tools, extensions
- Help
- More Flambe