Cocos2d-x  v4
TMXObjectGroup Class Reference

TMXObjectGroup represents the TMX object group. More...

Inherits Ref.

Public Member Functions

 TMXObjectGroup ()
 @js ctor
 
virtual ~TMXObjectGroup ()
 @js NA @lua NA
 
const std::string & getGroupName () const
 Get the group name. More...
 
void setGroupName (const std::string &groupName)
 Set the group name. More...
 
Value getProperty (const std::string &propertyName) const
 Return the value for the specific property name. More...
 
ValueMap getObject (const std::string &objectName) const
 Return the dictionary for the specific object name. More...
 
const Vec2getPositionOffset () const
 Gets the offset position of child objects. More...
 
void setPositionOffset (const Vec2 &offset)
 Sets the offset position of child objects. More...
 
const ValueMap & getProperties () const
 Gets the list of properties stored in a dictionary. More...
 
void setProperties (const ValueMap &properties)
 Sets the list of properties. More...
 
const ValueVector & getObjects () const
 Gets the array of the objects. More...
 
void setObjects (const ValueVector &objects)
 Sets the array of the objects. More...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor. More...
 

Additional Inherited Members

- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 
bool _rooted
 When true, it means that the object was already rooted.
 

Detailed Description

TMXObjectGroup represents the TMX object group.

Since
v0.99.0

Member Function Documentation

◆ getGroupName()

const std::string& getGroupName ( ) const
inline

Get the group name.

Returns
The group name.

◆ setGroupName()

void setGroupName ( const std::string &  groupName)
inline

Set the group name.

Parameters
groupNameA string,it is used to set the group name.

◆ getProperty()

Value getProperty ( const std::string &  propertyName) const

Return the value for the specific property name.

Parameters
propertyNameThe specific property name.
Returns
Return the value for the specific property name. @js NA

◆ getObject()

ValueMap getObject ( const std::string &  objectName) const

Return the dictionary for the specific object name.

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

Returns
Return the dictionary for the specific object name.

◆ getPositionOffset()

const Vec2& getPositionOffset ( ) const
inline

Gets the offset position of child objects.

Returns
The offset position of child objects.

◆ setPositionOffset()

void setPositionOffset ( const Vec2 offset)
inline

Sets the offset position of child objects.

Parameters
offsetThe offset position of child objects.

◆ getProperties()

const ValueMap& getProperties ( ) const
inline

Gets the list of properties stored in a dictionary.

Returns
The list of properties stored in a dictionary.

◆ setProperties()

void setProperties ( const ValueMap &  properties)
inline

Sets the list of properties.

Parameters
propertiesThe list of properties.

◆ getObjects()

const ValueVector& getObjects ( ) const
inline

Gets the array of the objects.

Returns
The array of the objects.

◆ setObjects()

void setObjects ( const ValueVector &  objects)
inline

Sets the array of the objects.

Parameters
objectsThe array of the objects.

The documentation for this class was generated from the following file: