Module flower.Group
A class to manage and control sets of DisplayObjects.
Extends:
Info:
- Release: V3.0.0
- Author: Makoto
Functions
Group:init (layer, width, height) | The constructor. |
Group:setSize (width, height) | Sets the size. |
Group:fitChildrenSize (width, height) | Sets the size. |
Group:setBounds (xMin, yMin, zMin, xMax, yMax, zMax) | Sets the bounds. |
Group:addChild (child) | Adds the specified child. |
Group:removeChild (child) | Removes a child. |
Group:addChildren (children) | Add the children. |
Group:removeChildren () | Remove the children. |
Group:setChildren (children) | Set the children. |
Group:getChildByName (name) | Returns a child by name. |
Group:setLayer (layer) | Sets the layer for this group to use. |
Group:setVisible (value) | Sets the group's visibility. |
Group:setPriority (priority) | Sets the group's priority. |
Group:setScissorRect (scissorRect) | Specify whether to scissor test the children. |
Group:setScissorContent (enabled) | Specify whether to scissor test the children. |
Functions
- Group:init (layer, width, height)
-
The constructor.
Parameters:
- layer (option)layer object
- width (option)width
- height (option)height
see also:
- Group:setSize (width, height)
-
Sets the size.
This is the size of a Group, rather than of the children.
Parameters:
- width width
- height height
- Group:fitChildrenSize (width, height)
-
Sets the size.
Parameters:
- width width
- height height
- Group:setBounds (xMin, yMin, zMin, xMax, yMax, zMax)
-
Sets the bounds.
This is the bounds of a Group, rather than of the children.
Parameters:
- xMin xMin
- yMin yMin
- zMin zMin
- xMax xMax
- yMax yMax
- zMax zMax
- Group:addChild (child)
-
Adds the specified child.
Parameters:
- child DisplayObject
- Group:removeChild (child)
-
Removes a child.
Parameters:
- child DisplayObject
Returns:
-
True if removed.
- Group:addChildren (children)
-
Add the children.
Parameters:
- children
- Group:removeChildren ()
- Remove the children.
- Group:setChildren (children)
-
Set the children.
Parameters:
- children
- Group:getChildByName (name)
-
Returns a child by name.
Parameters:
- name child's name
Returns:
-
child
- Group:setLayer (layer)
-
Sets the layer for this group to use.
Parameters:
- layer MOAILayer object
- Group:setVisible (value)
-
Sets the group's visibility.
Also sets the visibility of any children.
Parameters:
- value visible
- Group:setPriority (priority)
-
Sets the group's priority.
Also sets the priority of any children.
Parameters:
- priority priority
- Group:setScissorRect (scissorRect)
-
Specify whether to scissor test the children.
Parameters:
- scissorRect scissorRect
- Group:setScissorContent (enabled)
-
Specify whether to scissor test the children.
If the group is moved, scissorRect to move.
Parameters:
- enabled enabled