Cocos Creator API

1.4.x

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

TiledObjectGroup

Module: cc

Renders the TMX object group.

Properties

__eventTargets Array private

Inherited from Component:

Register all related EventTargets, all event callbacks will be removed in _onPreDestroy

node Node

Inherited from Component:

The node this component is attached to. A component is always attached to a node.

examples:

cc.log(comp.node);

uuid String readOnly

Inherited from Component:

The uuid for editor.

examples:

cc.log(comp.uuid);

_enabled Boolean private

Inherited from Component:

enabled Boolean

Inherited from Component:

indicates whether this component is enabled or not.

examples:

comp.enabled = true;
cc.log(comp.enabled);

enabledInHierarchy Boolean readOnly

Inherited from Component:

indicates whether this component is enabled and its node is also active in the hierarchy.

examples:

cc.log(comp.enabledInHierarchy);

_isOnLoadCalled Boolean readOnly

Inherited from Component:

TODO

examples:

cc.log(_isOnLoadCalled);

_name String private

_objFlags Number private

name String

The name of the object.

examples:

obj.name = "New Obj";

isValid Boolean readOnly

Indicates whether the object is not yet destroyed.

examples:

cc.log(obj.isValid);

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

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 ( ) Object

List of properties stored in a dictionary.

returns:

type: Object

examples:

var offset = tMXObjectGroup.getProperties();

setProperties
(
  • Var
)

Set the properties of the object group.

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