Class cc.TMXObjectGroup
- Defined in: CCTMXObjectGroup.js
- Extends cc.Class
Constructor Attributes | Constructor Name and Description |
---|---|
cc.TMXObjectGroup represents the TMX object group.
|
Method Summary
Class Detail
cc.TMXObjectGroup()
cc.TMXObjectGroup represents the TMX object group.
Field Detail
{String}
groupName
- Name of the group
{Array}
properties
- Properties from the group. They can be added using tilemap editors
Method Detail
-
ctor()
The cc.TMXObjectGroup's constructor.
This function will automatically be invoked when you create a node using new construction: "var node = new cc.TMXObjectGroup()".
Override it to extend its behavior, remember to call "this._super()" in the extended "ctor" function. -
{String} getGroupName()Gets the Group name.
- Returns:
- {String}
-
{object|Null} getObject(objectName)
Return the dictionary for the specific object name.
It will return the 1st object found on the array for the given name.- Parameters:
- {String} objectName
- Returns:
- {object|Null}
-
{Array} getObjects()Gets the objects.
- Returns:
- {Array}
-
{cc.Point} getPositionOffset()Offset position of child objects
- Returns:
- {cc.Point}
-
{Array} getProperties()List of properties stored in a dictionary
- Returns:
- {Array}
-
{object|Null} objectNamed(objectName)
Return the dictionary for the specific object name.
It will return the 1st object found on the array for the given name.- Parameters:
- {String} objectName
- Deprecated:
- since v3.4 please use .getObject
- Returns:
- {object|Null}
-
{object} propertyNamed(propertyName)Return the value for the specific property name
- Parameters:
- {String} propertyName
- Returns:
- {object}
-
setGroupName(groupName)Set the Group name
- Parameters:
- {String} groupName
-
setObjects(objects)Set the objects.
- Parameters:
- {object} objects
-
setPositionOffset(offset)Offset position of child objects
- Parameters:
- {cc.Point} offset
-
setProperties(Var)List of properties stored in a dictionary
- Parameters:
- {object} Var