Class: DisplayGroups

rune.display.DisplayGroups()

The DisplayGroups class represents a manager for DisplayGroup objects. Groups created or added to the manager are updated automatically.

Constructor

new DisplayGroups()

Creates a new DisplayGroups object.
Source:

Methods

add(group) → {rune.display.DisplayGroup}

Adds an existing group object. Note that groups are only added if they do not already exist in the list.
Parameters:
Name Type Description
group rune.display.DisplayGroup Group to add.
Source:
Returns:
Type
rune.display.DisplayGroup

create(target) → {rune.display.DisplayGroup}

Creates and adds a new group. A group must be linked to a display object container to which all group members are added. A reference to the newly created group is returned by the method.
Parameters:
Name Type Description
target rune.display.DisplayObjectContainer The group's target object, ie where new group members are added.
Source:
Returns:
Type
rune.display.DisplayGroup

remove(group, disposeopt) → {rune.display.DisplayGroup}

Removes an existing group. By default, groups are not destroyed when they are removed from the list. Use the dispose argument to enable auto-destruction when the group is removed. If the group is destroyed, a null reference is returned, otherwise a reference to the removed group.
Parameters:
Name Type Attributes Default Description
group rune.display.DisplayGroup Group to remove.
dispose boolean <optional>
false Whether the removed group should be destroyed.
Source:
Returns:
Type
rune.display.DisplayGroup