LHNodeProtocol Reference

LHNodeProtocol.h

Instance Methods

getName

- (std::string)getName
Discussion

Returns the unique name of the node.

Declared In
LHNodeProtocol.h

getUuid

- (std::string)getUuid
Discussion

Returns the unique identifier of the node.

Declared In
LHNodeProtocol.h

getTags

- (std::vector<std::string>)getTags
Discussion

Returns all tag values of the node.

Declared In
LHNodeProtocol.h

getUserProperty

- (LHUserPropertyProtocol *)getUserProperty
Discussion

Returns the user property object assigned to this object or nil.

Declared In
LHNodeProtocol.h

getChildNodeWithName

- (Node *)getChildNodeWithName
Parameters
name

The unique name of the node.

Return Value

A node or NULL.

//make sure you cast to the right type or else you may get partial objects which could cause problems
//look inside LevelHelper scene navigator to see what kind of type a node is
LHNode* myNode = (LHNode*)this->getChildNodeWithName("myNodeName");

Discussion

Returns a node with the specified unique name or nil if that node is not found in the children hierarchy.

Declared In
LHNodeProtocol.h

getChildNodeWithUUID

- (Node *)getChildNodeWithUUID
Parameters
uuid

The unique idenfier of the node.

Return Value

A node or or NULL.

Discussion

Returns a node with the specified unique identifier or nil if that node is not found in the children hierarchy.

Declared In
LHNodeProtocol.h

getChildrenWithTags

- (__Array *)getChildrenWithTags
Parameters
tagValues

An vector containing tag names.

any

Specify if all or just one tag value of the node needs to be in common with the passed ones.

Return Value

An array of nodes.

Discussion

Returns all children nodes that have the specified tag values.

Declared In
LHNodeProtocol.h

getChildrenOfType

- (__Array *)getChildrenOfType
Parameters
type

A "Class" type.

Return Value

An array with all the found nodes of the specified class.

//this is how you should use this function
__Array* children = myObject->getChildrenOfType<Node*>();

Discussion

Returns all children nodes that are of specified class type. The type must be compatible with Cocos2d-X __Array type. (must be of Ref type)

Declared In
LHNodeProtocol.h
Last updated: 2015-2-12

Back to top

Copyright © VLADU BOGDAN DANIEL PFA.