private _setDefaults
Sets the default attributes for this entity.
private setModified
Sets whether this Entity has been modified since the last render
frame.
public addChild
Adds a child entity node to this entity.
public childCount
Counts the number of child nodes inside this entity.
public findTopChildAt
Tries to find the deepest child at the top most layer at this coordinates. TODO: Update this to support Layers once we have layers...
Entity
public getChildAt
Gets a child entity at the given index.
public getChildren
Returns an Iterator of Children. Can pass
in a set of coordinates to get children in a specific
region of coordinates relative to the entity (0,0 is top left of this entity).
If only the starTCoordinate is specified, looks up children who intersect with that point.
If both arguements are passed in, looks for children who intersect with the rect the coords create.
If neither are provided, just returns an iterator of all children.
Not recursive, only checks it's own children
Iterator
public getLocation
Gets the coordinates of this entity.
{ x : integer, y : integer, z : integer }
public indexOf
Finds the index of the given entity.
public isChild
Checks to see if the given entity is a child of
this entity.
public isModified
Indicates whether this Entity has been modified since the last render frame.
public removeAllChildren
Removes all child nodes of this entity.
public removeChild
Removes a child entity node from this entity.
public setLocation
Sets the coordinates of this entity. All arguments are optional.
Generated using TypeDoc
private _generateRegions
Genetates regions of children to make searches more efficient