scriptorum / flaxen

Haxe game engine with entity component system
MIT License
26 stars 2 forks source link

Flaxen node convenience methods #17

Closed scriptorum closed 9 years ago

scriptorum commented 9 years ago

Add Flaxen.getNodeList convenience method.

Also add Flaxen.getNode that returns first matching node and throws an error if there are more or none. That's a more typo-safe alternative to getEntityByName, and doesn't suffer from the hard-to-diagnose issue of having too many singleton entities.

scriptorum commented 9 years ago

Added getEntities to return an array of nodes given a node list, and getOneEntity to return a single entity from a node list.