Cocos Creator API

1.1.2

Cocos Creator is a highly customizable game development tool that utilizes the power of cocos2d-x.

TMXObjectGroup

Module: cc

cc.TMXObjectGroup represents the TMX object group.

Properties

properties - Properties from the group. They can be added using tilemap editors Array

groupName - Name of the group String

There are no properties that match your current filter settings. You can change your filter settings in the index section on this page. index

Methods

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.

getPositionOffset ( ) Vec2

Offset position of child objects.

returns:

type: Vec2

examples:

var offset = tMXObjectGroup.getPositionOffset();

setPositionOffset
(
  • offset
)

Offset position of child objects.

name type description
offset Vec2

examples:

tMXObjectGroup.setPositionOffset(cc.v2(5, 5));

getProperties ( ) Array

List of properties stored in a dictionary.

returns:

type: Array

examples:

var offset = tMXObjectGroup.getProperties();

setProperties
(
  • Var
)

List of properties stored in a dictionary.

name type description
Var Object

examples:

tMXObjectGroup.setProperties(obj);

getGroupName ( ) String

Gets the Group name.

returns:

type: String

examples:

var groupName = tMXObjectGroup.getGroupName;

setGroupName
(
  • groupName
)

Set the Group name.

name type description
groupName String

examples:

tMXObjectGroup.setGroupName("New Group");

getObject
(
  • objectName
)
Object | Null

Return the object for the specific object name.
It will return the 1st object found on the array for the given name.

name type description
objectName String

returns:

type: Object | Null

examples:

var object = tMXObjectGroup.getObject("Group");

getObjects ( ) Array

Gets the objects.

returns:

type: Array

examples:

var objects = tMXObjectGroup.getObjects();

setObjects
(
  • objects
)

Set the objects.

name type description
objects Object

examples:

tMXObjectGroup.setObjects(objects);

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index