Classes
Class that creates and handle the main Window and manages how and when to execute the Scenes.
More...
DisplayLinkDirector is a Director that synchronizes timers with the refresh rate of the display.
More...
Macros
Typedefs
Enumerations
Possible OpenGL projections used by director.
More...
Functions
Returns a camera object that lets you move the node using a gluLookAt.
More...
Returns a camera object that lets you move the node using a gluLookAt.
More...
Returns whether or not the node accepts event callbacks.
More...
Returns whether or not the node accepts event callbacks.
More...
Returns whether or not the node accepts event callbacks.
More...
Stops all running actions and schedulers.
More...
Stops all running actions and schedulers.
More...
Stops all running actions and schedulers.
More...
Override this method to draw your own node.
More...
virtual void
visit (void)
Visits this node's children and draw them recursively.
More...
Returns a "local" axis aligned bounding box of the node.
More...
Returns a "local" axis aligned bounding box of the node.
More...
Returns a "local" axis aligned bounding box of the node.
More...
static CCNodeRGBA *
create (void)
Allocates and initializes a nodergba.
More...
Allocates and initializes a nodergba.
More...
Returns the displayed opacity.
More...
Returns the displayed opacity.
More...
recursive method that updates the displayed opacity.
More...
recursive method that updates the displayed opacity.
More...
whether or not opacity should be propagated to its children.
More...
whether or not opacity should be propagated to its children.
More...
whether or not opacity should be propagated to its children.
More...
Returns color that is currently used.
More...
Returns color that is currently used.
More...
Returns the displayed color.
More...
Returns the displayed color.
More...
recursive method that updates display color
More...
recursive method that updates display color
More...
whether or not color should be propagated to its children.
More...
whether or not color should be propagated to its children.
More...
whether or not color should be propagated to its children.
More...
Changes the OpacityModifyRGB property.
More...
Changes the OpacityModifyRGB property.
More...
Changes the OpacityModifyRGB property.
More...
Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity)
More...
Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity)
More...
Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity)
More...
Variables
anchor point normalized (NOT in points)
More...
anchor point normalized (NOT in points)
More...
anchor point normalized (NOT in points)
More...
untransformed size of the node
More...
untransformed size of the node
More...
untransformed size of the node
More...
z-order value that affects the draw order
More...
z-order value that affects the draw order
More...
z-order value that affects the draw order
More...
weak reference to parent node
More...
weak reference to parent node
More...
weak reference to parent node
More...
a tag. Can be any number you assigned just to identify this node
More...
a tag. Can be any number you assigned just to identify this node
More...
a tag. Can be any number you assigned just to identify this node
More...
A user assingned void pointer, Can be point to any cpp object.
More...
A user assingned void pointer, Can be point to any cpp object.
More...
A user assingned void pointer, Can be point to any cpp object.
More...
used to preserve sequence while sorting children with the same zOrder
More...
used to preserve sequence while sorting children with the same zOrder
More...
used to preserve sequence while sorting children with the same zOrder
More...
scheduler used to schedule timers and updates
More...
scheduler used to schedule timers and updates
More...
scheduler used to schedule timers and updates
More...
a pointer to ActionManager singleton, which is used to handle all the actions
More...
The flag to check whether the additional transform is dirty.
More...
The flag to check whether the additional transform is dirty.
More...
The flag to check whether the additional transform is dirty.
More...
true if the Anchor Point will be (0,0) when you position the
CCNode, false otherwise.
More...
true if the Anchor Point will be (0,0) when you position the
CCNode, false otherwise.
More...
true if the Anchor Point will be (0,0) when you position the
CCNode, false otherwise.
More...
script handler for
update() callback per frame, which is invoked from lua & javascript.
More...
type of script binding, lua or javascript
More...
type of script binding, lua or javascript
More...
type of script binding, lua or javascript
More...
Constructor, Distructor and Initializers
Allocates and initializes a node.
More...
Gets the description string.
More...
Gets the description string.
More...
Setters & Getters for Graphic Peroperties
Sets the Z order which stands for the drawing order, and reorder this node in its parent's children array.
More...
Sets the z order which stands for the drawing order.
More...
Sets the z order which stands for the drawing order.
More...
Sets the z order which stands for the drawing order.
More...
Gets the Z order of this node.
More...
Gets the Z order of this node.
More...
Gets the Z order of this node.
More...
Sets the real OpenGL Z vertex.
More...
Sets the real OpenGL Z vertex.
More...
Sets the real OpenGL Z vertex.
More...
Gets OpenGL Z vertex of this node.
More...
Gets OpenGL Z vertex of this node.
More...
Gets OpenGL Z vertex of this node.
More...
Changes the scale factor on X axis of this node.
More...
Returns the scale factor on X axis of this node.
More...
Returns the scale factor on X axis of this node.
More...
Returns the scale factor on X axis of this node.
More...
Changes the scale factor on Y axis of this node.
More...
Changes the scale factor on Y axis of this node.
More...
Returns the scale factor on Y axis of this node.
More...
Changes both X and Y scale factor of the node.
More...
Changes both X and Y scale factor of the node.
More...
Gets the scale factor of the node, when X and Y have the same scale factor.
More...
virtual void
setScale (float fScaleX, float fScaleY)
Changes both X and Y scale factor of the node.
More...
local
setScale ( local fScaleX, local fScaleY)
Changes both X and Y scale factor of the node.
More...
Changes the position (x,y) of the node in OpenGL coordinates.
More...
Gets the position (x,y) of the node in OpenGL coordinates.
More...
Gets the position (x,y) of the node in OpenGL coordinates.
More...
Sets position in a more efficient way.
More...
Sets position in a more efficient way.
More...
Gets position in a more efficient way, returns two number instead of a
CCPoint object.
More...
Gets position in a more efficient way, returns two number instead of a
CCPoint object.
More...
Gets/Sets x or y coordinate individually for position.
More...
Gets/Sets x or y coordinate individually for position.
More...
Gets/Sets x or y coordinate individually for position.
More...
Changes the X skew angle of the node in degrees.
More...
Changes the X skew angle of the node in degrees.
More...
Returns the X skew angle of the node in degrees.
More...
Changes the Y skew angle of the node in degrees.
More...
Changes the Y skew angle of the node in degrees.
More...
Returns the Y skew angle of the node in degrees.
More...
Sets the anchor point in percent.
More...
Sets the anchor point in percent.
More...
Returns the anchor point in percent.
More...
Returns the anchor point in percent.
More...
Returns the anchorPoint in absolute pixels.
More...
Sets the untransformed size of the node.
More...
Sets the untransformed size of the node.
More...
Returns the untransformed size of the node.
More...
Returns the untransformed size of the node.
More...
Sets whether the node is visible.
More...
Sets whether the node is visible.
More...
Determines if the node is visible.
More...
Sets the rotation (angle) of the node in degrees.
More...
Sets the rotation (angle) of the node in degrees.
More...
Returns the rotation of the node in degrees.
More...
Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew.
More...
Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew.
More...
Gets the X rotation (angle) of the node in degrees which performs a horizontal rotation skew.
More...
Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
More...
Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
More...
Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
More...
Sets the arrival order when this node has a same ZOrder with other children.
More...
Sets the arrival order when this node has a same ZOrder with other children.
More...
Returns the arrival order, indecates which children is added previously.
More...
Sets the state of OpenGL server side.
More...
Sets the state of OpenGL server side.
More...
Returns the state of OpenGL server side.
More...
Returns the state of OpenGL server side.
More...
Sets whether the anchor point will be (0,0) when you position this node.
More...
Sets whether the anchor point will be (0,0) when you position this node.
More...
Gets whether the anchor point will be (0,0) when you position this node.
More...
Children and Parent
Adds a child to the container with z-order as 0.
More...
virtual void
addChild (CCNode *child, int zOrder)
Adds a child to the container with a z-order.
More...
local
addChild ( local child, local zOrder)
Adds a child to the container with a z-order.
More...
virtual void
addChild (CCNode *child, int zOrder, int tag)
Adds a child to the container with z order and tag.
More...
var
addChild ( var child, var zOrder, var tag)
Adds a child to the container with z order and tag.
More...
local
addChild ( local child, local zOrder, local tag)
Adds a child to the container with z order and tag.
More...
Gets a child from the container with its tag.
More...
Return an array of children.
More...
Return an array of children.
More...
Return an array of children.
More...
Get the amount of children.
More...
Get the amount of children.
More...
Returns a pointer to the parent node.
More...
Returns a pointer to the parent node.
More...
Returns a pointer to the parent node.
More...
Removes this node itself from its parent node with a cleanup.
More...
Removes this node itself from its parent node with a cleanup.
More...
Removes this node itself from its parent node with a cleanup.
More...
Removes this node itself from its parent node.
More...
Removes this node itself from its parent node.
More...
Removes a child from the container with a cleanup.
More...
Removes a child from the container.
More...
Removes a child from the container by tag value with a cleanup.
More...
Removes a child from the container by tag value.
More...
Removes a child from the container by tag value.
More...
Removes all children from the container with a cleanup.
More...
Removes all children from the container with a cleanup.
More...
Removes all children from the container with a cleanup.
More...
Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
More...
Reorders a child according to a new z value.
More...
Sorts the children array once before drawing, instead of every time when a child is added or reordered.
More...
Sorts the children array once before drawing, instead of every time when a child is added or reordered.
More...
Grid object for effects
Returns a grid object that is used when applying effects.
More...
Returns a grid object that is used when applying effects.
More...
virtual void
setGrid (CCGridBase *pGrid)
Changes a grid object that is used when applying effects.
More...
Changes a grid object that is used when applying effects.
More...
Changes a grid object that is used when applying effects.
More...
Tag & User data
Returns a tag that is used to identify the node easily.
More...
Returns a tag that is used to identify the node easily.
More...
virtual void
setTag (int nTag)
Changes the tag that is used to identify the node easily.
More...
Changes the tag that is used to identify the node easily.
More...
Changes the tag that is used to identify the node easily.
More...
Returns a custom user data pointer.
More...
Returns a custom user data pointer.
More...
Sets a custom user data pointer.
More...
Shader Program
Return the shader program currently used for this node.
More...
Return the shader program currently used for this node.
More...
Sets the shader program for this node.
More...
Sets the shader program for this node.
More...
Script Bindings for lua
Gets script handler for onEnter/onExit event.
More...
Gets script handler for onEnter/onExit event.
More...
Gets script handler for onEnter/onExit event.
More...
Event Callbacks
Event callback that is invoked every time when
CCNode enters the 'stage'.
More...
Event callback that is invoked when the
CCNode enters in the 'stage'.
More...
Event callback that is invoked every time the
CCNode leaves the 'stage'.
More...
Event callback that is called every time the
CCNode leaves the 'stage'.
More...
Actions
Executes an action, and returns the action that is executed.
More...
Executes an action, and returns the action that is executed.
More...
Stops and removes all actions from the running action list .
More...
Stops and removes all actions from the running action list .
More...
Stops and removes all actions from the running action list .
More...
Stops and removes an action from the running action list.
More...
Stops and removes an action from the running action list.
More...
Stops and removes an action from the running action list.
More...
Removes an action from the running action list by its tag.
More...
Removes an action from the running action list by its tag.
More...
Removes an action from the running action list by its tag.
More...
Gets an action from the running action list by its tag.
More...
Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).
More...
Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).
More...
Scheduler and Timer
Checks whether a selector is scheduled.
More...
Schedules the "update" method.
More...
Schedules the "update" method with a custom priority.
More...
void
schedule (SEL_SCHEDULE selector, float interval, unsigned int repeat, float delay)
Schedules a custom selector.
More...
void
schedule (SEL_SCHEDULE selector, float interval)
Schedules a custom selector with an interval time in seconds.
More...
Schedules a selector that runs only once, with a delay of 0 or larger.
More...
Schedules a selector that runs only once, with a delay of 0 or larger.
More...
Schedules a custom selector, the scheduled selector will be ticked every frame.
More...
Unschedules a custom selector.
More...
Unschedules a custom selector.
More...
Unschedule all scheduled selectors: custom selectors, and the 'update' selector.
More...
Unschedule all scheduled selectors: custom selectors, and the 'update' selector.
More...
Resumes all scheduled selectors and actions.
More...
Pauses all scheduled selectors and actions.
More...
virtual void
update (float delta)
Transformations
Performs OpenGL view-matrix transformation based on position, scale, rotation and other attributes.
More...
Performs OpenGL view-matrix transformation of it's ancestors.
More...
Performs OpenGL view-matrix transformation of it's ancestors.
More...
Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
More...
Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
More...
Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
More...
Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
More...
Returns the world affine transform matrix.
More...
Returns the world affine transform matrix.
More...
Returns the inverse world affine transform matrix.
More...
Coordinate Converters
Converts a Point to node (local) space coordinates.
More...
Converts a Point to node (local) space coordinates.
More...
Converts a Point to node (local) space coordinates.
More...
Converts a Point to world space coordinates.
More...
Converts a Point to world space coordinates.
More...
Converts a Point to world space coordinates.
More...
Converts a Point to node (local) space coordinates.
More...
Converts a Point to node (local) space coordinates.
More...
Converts a Point to node (local) space coordinates.
More...
Converts a local Point to world space coordinates.The result is in Points.
More...
Converts a local Point to world space coordinates.The result is in Points.
More...
Converts a local Point to world space coordinates.The result is in Points.
More...
converts a
CCTouch (world coordinates) into a local coordinate.
More...
converts a
CCTouch (world coordinates) into a local coordinate.
More...
converts a
CCTouch (world coordinates) into a local coordinate.
More...
Sets the additional transform.
More...
Sets the additional transform.
More...
component functions
gets a component by its name
More...
removes a component by its name
More...
removes a component by its name
More...
removes a component by its name
More...
Detailed Description
Macro Definition Documentation
#define callfunc_selector
(
_SELECTOR)
(SEL_CallFunc)(&_SELECTOR)
var callfunc_selector
(
var)
(SEL_CallFunc)(&_SELECTOR)
local callfunc_selector
(
local)
(SEL_CallFunc)(&_SELECTOR)
#define callfuncN_selector
(
_SELECTOR)
(SEL_CallFuncN)(&_SELECTOR)
var callfuncN_selector
(
var)
(SEL_CallFuncN)(&_SELECTOR)
local callfuncN_selector
(
local)
(SEL_CallFuncN)(&_SELECTOR)
#define callfuncND_selector
(
_SELECTOR)
(SEL_CallFuncND)(&_SELECTOR)
#define callfuncO_selector
(
_SELECTOR)
(SEL_CallFuncO)(&_SELECTOR)
var callfuncO_selector
(
var)
(SEL_CallFuncO)(&_SELECTOR)
local callfuncO_selector
(
local)
(SEL_CallFuncO)(&_SELECTOR)
#define compare_selector
(
_SELECTOR)
(SEL_Compare)(&_SELECTOR)
var compare_selector
(
var)
(SEL_Compare)(&_SELECTOR)
local compare_selector
(
local)
(SEL_Compare)(&_SELECTOR)
#define event_selector
(
_SELECTOR)
(SEL_EventHandler)(&_SELECTOR)
var event_selector
(
var)
(SEL_EventHandler)(&_SELECTOR)
local event_selector
(
local)
(SEL_EventHandler)(&_SELECTOR)
#define menu_selector
(
_SELECTOR)
(SEL_MenuHandler)(&_SELECTOR)
var menu_selector
(
var)
(SEL_MenuHandler)(&_SELECTOR)
local menu_selector
(
local)
(SEL_MenuHandler)(&_SELECTOR)
#define schedule_selector
(
_SELECTOR)
(SEL_SCHEDULE)(&_SELECTOR)
var schedule_selector
(
var)
(SEL_SCHEDULE)(&_SELECTOR)
Typedef Documentation
typedef void(CCObject::*
SEL_CallFunc)()
typedef void(CCObject::*
SEL_CallFunc)()
typedef void(CCObject::*
SEL_CallFunc)()
typedef void(CCObject::*
SEL_CallFuncN)(CCNode *)
typedef void(CCObject::*
SEL_CallFuncN)(CCNode *)
typedef void(CCObject::*
SEL_CallFuncN)(CCNode *)
typedef void(CCObject::*
SEL_CallFuncND)(CCNode *, void *)
typedef void(CCObject::*
SEL_CallFuncND)(CCNode *, void *)
typedef void(CCObject::*
SEL_CallFuncND)(CCNode *, void *)
typedef void(CCObject::*
SEL_CallFuncO)(CCObject *)
typedef void(CCObject::*
SEL_CallFuncO)(CCObject *)
typedef void(CCObject::*
SEL_CallFuncO)(CCObject *)
typedef int(CCObject::*
SEL_Compare)(CCObject *)
typedef int(CCObject::*
SEL_Compare)(CCObject *)
typedef int(CCObject::*
SEL_Compare)(CCObject *)
typedef void(CCObject::*
SEL_EventHandler)(CCEvent *)
typedef void(CCObject::*
SEL_EventHandler)(CCEvent *)
typedef void(CCObject::*
SEL_EventHandler)(CCEvent *)
typedef void(CCObject::*
SEL_MenuHandler)(CCObject *)
typedef void(CCObject::*
SEL_MenuHandler)(CCObject *)
typedef void(CCObject::*
SEL_MenuHandler)(CCObject *)
typedef void(CCObject::*
SEL_SCHEDULE)(float)
typedef void(CCObject::*
SEL_SCHEDULE)(float)
typedef void(CCObject::*
SEL_SCHEDULE)(float)
Enumeration Type Documentation
| Enumerator |
|---|
| kCCNodeTagInvalid |
| Enumerator |
|---|
| kCCNodeTagInvalid |
| Enumerator |
|---|
| kCCNodeTagInvalid |
| Enumerator |
|---|
| kCCNodeOnEnter |
| kCCNodeOnExit |
| kCCNodeOnEnterTransitionDidFinish |
| kCCNodeOnExitTransitionDidStart |
| kCCNodeOnCleanup |
| Enumerator |
|---|
| kCCNodeOnEnter |
| kCCNodeOnExit |
| kCCNodeOnEnterTransitionDidFinish |
| kCCNodeOnExitTransitionDidStart |
| kCCNodeOnCleanup |
| Enumerator |
|---|
| kCCNodeOnEnter |
| kCCNodeOnExit |
| kCCNodeOnEnterTransitionDidFinish |
| kCCNodeOnExitTransitionDidStart |
| kCCNodeOnCleanup |
enum ccDirectorProjection
Possible OpenGL projections used by director.
| Enumerator |
|---|
| kCCDirectorProjection2D |
sets a 2D projection (orthogonal projection)
|
| kCCDirectorProjection3D |
sets a 3D projection with a fovy=60, znear=0.5f and zfar=1500.
|
| kCCDirectorProjectionCustom |
it calls "updateProjection" on the projection delegate.
|
| kCCDirectorProjectionDefault |
Default projection is 3D projection.
|
Possible OpenGL projections used by director.
| Enumerator |
|---|
| kCCDirectorProjection2D |
sets a 2D projection (orthogonal projection)
|
| kCCDirectorProjection3D |
sets a 3D projection with a fovy=60, znear=0.5f and zfar=1500.
|
| kCCDirectorProjectionCustom |
it calls "updateProjection" on the projection delegate.
|
| kCCDirectorProjectionDefault |
Default projection is 3D projection.
|
local ccDirectorProjection
Possible OpenGL projections used by director.
| Enumerator |
|---|
| kCCDirectorProjection2D |
sets a 2D projection (orthogonal projection)
|
| kCCDirectorProjection3D |
sets a 3D projection with a fovy=60, znear=0.5f and zfar=1500.
|
| kCCDirectorProjectionCustom |
it calls "updateProjection" on the projection delegate.
|
| kCCDirectorProjectionDefault |
Default projection is 3D projection.
|
Function Documentation
virtual ~CCNode
(
void
)
virtual |
virtual ~CCNodeRGBA
(
)
virtual |
virtual void _setZOrder
(
int
z)
virtual |
Sets the z order which stands for the drawing order.
This is an internal method. Don't call it outside the framework. The difference between setZOrder(int) and _setOrder(int) is:
- _setZOrder(int) is a pure setter for m_nZOrder memeber variable
- setZOrder(int) firstly changes m_nZOrder, then recorder this node in its parent's chilren array.
var _setZOrder
(
var
z)
virtual |
Sets the z order which stands for the drawing order.
This is an internal method. Don't call it outside the framework. The difference between setZOrder(int) and _setOrder(int) is:
- _setZOrder(int) is a pure setter for m_nZOrder memeber variable
- setZOrder(int) firstly changes m_nZOrder, then recorder this node in its parent's chilren array.
local _setZOrder
(
local
z)
virtual |
Sets the z order which stands for the drawing order.
This is an internal method. Don't call it outside the framework. The difference between setZOrder(int) and _setOrder(int) is:
- _setZOrder(int) is a pure setter for m_nZOrder memeber variable
- setZOrder(int) firstly changes m_nZOrder, then recorder this node in its parent's chilren array.
virtual void addChild
(
CCNode *
child)
virtual |
var addChild
(
var
child)
virtual |
local addChild
(
local
child)
virtual |
virtual void addChild
(
CCNode *
child,
int
zOrder
)
virtual |
var addChild
(
var
child,
var
zOrder
)
virtual |
local addChild
(
local
child,
local
zOrder
)
virtual |
virtual void addChild
(
CCNode *
child,
int
zOrder,
int
tag
)
virtual |
var addChild
(
var
child,
var
zOrder,
var
tag
)
virtual |
local addChild
(
local
child,
local
zOrder,
local
tag
)
virtual |
var addComponent
(
var
pComponent)
virtual |
local addComponent
(
local
pComponent)
virtual |
CCRect boundingBox
(
void
)
Returns a "local" axis aligned bounding box of the node.
The returned box is relative only to its parent.
- Note
- This method returns a temporaty variable, so it can't returns const CCRect&
- Todo:
- Rename to getBoundingBox() in the future versions.
- Returns
- A "local" axis aligned boudning box of the node.
Returns a "local" axis aligned bounding box of the node.
The returned box is relative only to its parent.
- Note
- This method returns a temporaty variable, so it can't returns const CCRect&
- Todo:
- Rename to getBoundingBox() in the future versions.
- Returns
- A "local" axis aligned boudning box of the node.
Returns a "local" axis aligned bounding box of the node.
The returned box is relative only to its parent.
- Note
- This method returns a temporaty variable, so it can't returns const CCRect&
- Todo:
- Rename to getBoundingBox() in the future versions.
- Returns
- A "local" axis aligned boudning box of the node.
virtual void cleanup
(
void
)
virtual |
local cleanup
(
)
virtual |
CCPoint convertToNodeSpace
(
const
CCPoint &
worldPoint)
Converts a Point to node (local) space coordinates.
The result is in Points.
var convertToNodeSpace
(
var
worldPoint)
Converts a Point to node (local) space coordinates.
The result is in Points.
local convertToNodeSpace
(
local
worldPoint)
Converts a Point to node (local) space coordinates.
The result is in Points.
CCPoint convertToNodeSpaceAR
(
const
CCPoint &
worldPoint)
Converts a Point to node (local) space coordinates.
The result is in Points. treating the returned/received node point as anchor relative.
var convertToNodeSpaceAR
(
var
worldPoint)
Converts a Point to node (local) space coordinates.
The result is in Points. treating the returned/received node point as anchor relative.
local convertToNodeSpaceAR
(
local
worldPoint)
Converts a Point to node (local) space coordinates.
The result is in Points. treating the returned/received node point as anchor relative.
CCPoint convertTouchToNodeSpace
(
CCTouch *
touch)
var convertTouchToNodeSpace
(
var
touch)
local convertTouchToNodeSpace
(
local
touch)
CCPoint convertTouchToNodeSpaceAR
(
CCTouch *
touch)
converts a CCTouch (world coordinates) into a local coordinate.
This method is AR (Anchor Relative).
var convertTouchToNodeSpaceAR
(
var
touch)
converts a CCTouch (world coordinates) into a local coordinate.
This method is AR (Anchor Relative).
local convertTouchToNodeSpaceAR
(
local
touch)
converts a CCTouch (world coordinates) into a local coordinate.
This method is AR (Anchor Relative).
CCPoint convertToWorldSpace
(
const
CCPoint &
nodePoint)
Converts a Point to world space coordinates.
The result is in Points.
var convertToWorldSpace
(
var
nodePoint)
Converts a Point to world space coordinates.
The result is in Points.
local convertToWorldSpace
(
local
nodePoint)
Converts a Point to world space coordinates.
The result is in Points.
CCPoint convertToWorldSpaceAR
(
const
CCPoint &
nodePoint)
Converts a local Point to world space coordinates.The result is in Points.
treating the returned/received node point as anchor relative.
var convertToWorldSpaceAR
(
var
nodePoint)
Converts a local Point to world space coordinates.The result is in Points.
treating the returned/received node point as anchor relative.
local convertToWorldSpaceAR
(
local
nodePoint)
Converts a local Point to world space coordinates.The result is in Points.
treating the returned/received node point as anchor relative.
static CCNode* create
(
void
)
static |
Allocates and initializes a node.
- Returns
- A initialized node which is marked as "autorelease".
Allocates and initializes a node.
- Returns
- A initialized node which is marked as "autorelease".
Allocates and initializes a node.
- Returns
- A initialized node which is marked as "autorelease".
static CCNodeRGBA* create
(
void
)
static |
Allocates and initializes a nodergba.
- Returns
- A initialized node which is marked as "autorelease".
Allocates and initializes a nodergba.
- Returns
- A initialized node which is marked as "autorelease".
Allocates and initializes a nodergba.
- Returns
- A initialized node which is marked as "autorelease".
const char* description
(
void
)
Gets the description string.
It makes debugging easier.
- Returns
- A string terminated with '0円'
Gets the description string.
It makes debugging easier.
- Returns
- A string terminated with '0円'
virtual void draw
(
void
)
virtual |
Override this method to draw your own node.
The following GL states will be enabled by default:
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_COLOR_ARRAY);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glEnable(GL_TEXTURE_2D); AND YOU SHOULD NOT DISABLE THEM AFTER DRAWING YOUR NODE But if you enable any other GL state, you should disable it after drawing your node.
Reimplemented in CCTransitionCrossFade, CCSprite, CCLayerColor, CCTextFieldTTF, CCSpriteBatchNode, CCArmature, CCParticleSystemQuad, CCAtlasNode, CCParticleBatchNode, CCTransitionScene, CCProgressTimer, CCMotionStreak, CCRenderTexture, CCDrawNode, CCBatchNode, CCSkeleton, and UICCLabelAtlas.
Override this method to draw your own node.
The following GL states will be enabled by default:
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_COLOR_ARRAY);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glEnable(GL_TEXTURE_2D); AND YOU SHOULD NOT DISABLE THEM AFTER DRAWING YOUR NODE But if you enable any other GL state, you should disable it after drawing your node.
Reimplemented in CCTransitionCrossFade, CCSprite, CCLayerColor, CCTextFieldTTF, CCSpriteBatchNode, CCArmature, CCParticleSystemQuad, CCAtlasNode, CCParticleBatchNode, CCTransitionScene, CCProgressTimer, CCMotionStreak, CCRenderTexture, CCDrawNode, CCBatchNode, CCSkeleton, and UICCLabelAtlas.
Override this method to draw your own node.
The following GL states will be enabled by default:
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_COLOR_ARRAY);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glEnable(GL_TEXTURE_2D); AND YOU SHOULD NOT DISABLE THEM AFTER DRAWING YOUR NODE But if you enable any other GL state, you should disable it after drawing your node.
Reimplemented in CCTransitionCrossFade, CCSprite, CCLayerColor, CCTextFieldTTF, CCSpriteBatchNode, CCArmature, CCParticleSystemQuad, CCAtlasNode, CCParticleBatchNode, CCTransitionScene, CCProgressTimer, CCMotionStreak, CCRenderTexture, CCDrawNode, CCBatchNode, CCSkeleton, and UICCLabelAtlas.
CCAction* getActionByTag
(
int
tag)
Gets an action from the running action list by its tag.
- See Also
- setTag(int), getTag().
- Returns
- The action object with the given tag.
var getActionByTag
(
var
tag)
Gets an action from the running action list by its tag.
- See Also
- setTag(int), getTag().
- Returns
- The action object with the given tag.
local getActionByTag
(
local
tag)
Gets an action from the running action list by its tag.
- See Also
- setTag(int), getTag().
- Returns
- The action object with the given tag.
virtual CCActionManager*
getActionManager
(
)
virtual |
var getActionManager
(
)
virtual |
local getActionManager
(
)
virtual |
virtual const CCPoint&
getAnchorPoint
(
)
virtual |
var getAnchorPoint
(
)
virtual |
local getAnchorPoint
(
)
virtual |
virtual const CCPoint&
getAnchorPointInPoints
(
)
virtual |
Returns the anchorPoint in absolute pixels.
- Warning
- You can only read it. If you wish to modify it, use anchorPoint instead.
- See Also
- getAnchorPoint()
- Returns
- The anchor point in absolute pixels.
var getAnchorPointInPoints
(
)
virtual |
Returns the anchorPoint in absolute pixels.
- Warning
- You can only read it. If you wish to modify it, use anchorPoint instead.
- See Also
- getAnchorPoint()
- Returns
- The anchor point in absolute pixels.
local getAnchorPointInPoints
(
)
virtual |
Returns the anchorPoint in absolute pixels.
- Warning
- You can only read it. If you wish to modify it, use anchorPoint instead.
- See Also
- getAnchorPoint()
- Returns
- The anchor point in absolute pixels.
virtual CCCamera* getCamera
(
)
virtual |
Returns a camera object that lets you move the node using a gluLookAt.
CCCamera* camera = node->getCamera();
camera->setEyeXYZ(0, 0, 415/2);
camera->setCenterXYZ(0, 0, 0);
- Returns
- A CCCamera object that lets you move the node using a gluLookAt
var getCamera
(
)
virtual |
Returns a camera object that lets you move the node using a gluLookAt.
CCCamera* camera = node->getCamera();
camera->setEyeXYZ(0, 0, 415/2);
camera->setCenterXYZ(0, 0, 0);
- Returns
- A CCCamera object that lets you move the node using a gluLookAt
local getCamera
(
)
virtual |
Returns a camera object that lets you move the node using a gluLookAt.
CCCamera* camera = node->getCamera();
camera->setEyeXYZ(0, 0, 415/2);
camera->setCenterXYZ(0, 0, 0);
- Returns
- A CCCamera object that lets you move the node using a gluLookAt
CCNode* getChildByTag
(
int
tag)
Gets a child from the container with its tag.
- Parameters
-
tag An identifier to find the child node.
- Returns
- a CCNode object whose tag equals to the input parameter
var getChildByTag
(
var
tag)
Gets a child from the container with its tag.
- Parameters
-
tag An identifier to find the child node.
- Returns
- a CCNode object whose tag equals to the input parameter
local getChildByTag
(
local
tag)
Gets a child from the container with its tag.
- Parameters
-
tag An identifier to find the child node.
- Returns
- a CCNode object whose tag equals to the input parameter
virtual CCArray* getChildren
(
)
virtual |
Return an array of children.
Composing a "tree" structure is a very important feature of CCNode Here's a sample code of traversing children array:
{
node->setPosition(0,0);
}
This sample code traverses all children nodes, and set theie position to (0,0)
- Returns
- An array of children
var getChildren
(
)
virtual |
Return an array of children.
Composing a "tree" structure is a very important feature of CCNode Here's a sample code of traversing children array:
{
node->setPosition(0,0);
}
This sample code traverses all children nodes, and set theie position to (0,0)
- Returns
- An array of children
local getChildren
(
)
virtual |
Return an array of children.
Composing a "tree" structure is a very important feature of CCNode Here's a sample code of traversing children array:
{
node->setPosition(0,0);
}
This sample code traverses all children nodes, and set theie position to (0,0)
- Returns
- An array of children
unsigned int getChildrenCount
(
void
)
const
Get the amount of children.
- Returns
- The amount of children.
Get the amount of children.
- Returns
- The amount of children.
local getChildrenCount
(
)
Get the amount of children.
- Returns
- The amount of children.
local getColor
(
)
virtual |
CCComponent* getComponent
(
const char *
pName)
const
gets a component by its name
var getComponent
(
var
pName)
gets a component by its name
local getComponent
(
local
pName)
gets a component by its name
virtual const CCSize&
getContentSize
(
)
const
virtual |
var getContentSize
(
)
virtual |
local getContentSize
(
)
virtual |
virtual const
ccColor3B&
getDisplayedColor
(
)
virtual |
var getDisplayedColor
(
)
virtual |
local getDisplayedColor
(
)
virtual |
virtual GLubyte getDisplayedOpacity
(
)
virtual |
Returns the displayed opacity.
- Returns
- The opacity of sprite, from 0 ~ 255
Implements CCRGBAProtocol.
var getDisplayedOpacity
(
)
virtual |
Returns the displayed opacity.
- Returns
- The opacity of sprite, from 0 ~ 255
Implements CCRGBAProtocol.
local getDisplayedOpacity
(
)
virtual |
Returns the displayed opacity.
- Returns
- The opacity of sprite, from 0 ~ 255
Implements CCRGBAProtocol.
virtual ccGLServerState
getGLServerState
(
)
virtual |
Returns the state of OpenGL server side.
- Returns
- The state of OpenGL server side.
local getGLServerState
(
)
virtual |
Returns the state of OpenGL server side.
- Returns
- The state of OpenGL server side.
virtual CCGridBase* getGrid
(
)
virtual |
Returns a grid object that is used when applying effects.
- Returns
- A CCGrid object that is used when applying effects
local getGrid
(
)
virtual |
Returns a grid object that is used when applying effects.
- Returns
- A CCGrid object that is used when applying effects
virtual GLubyte getOpacity
(
)
virtual |
var getOpacity
(
)
virtual |
local getOpacity
(
)
virtual |
virtual unsigned int
getOrderOfArrival
(
)
virtual |
var getOrderOfArrival
(
)
virtual |
local getOrderOfArrival
(
)
virtual |
virtual CCNode* getParent
(
)
virtual |
Returns a pointer to the parent node.
- See Also
- setParent(CCNode*)
- Returns
- A pointer to the parnet node
var getParent
(
)
virtual |
Returns a pointer to the parent node.
- See Also
- setParent(CCNode*)
- Returns
- A pointer to the parnet node
local getParent
(
)
virtual |
Returns a pointer to the parent node.
- See Also
- setParent(CCNode*)
- Returns
- A pointer to the parnet node
virtual const CCPoint& getPosition
(
)
virtual |
var getPosition
(
)
virtual |
local getPosition
(
)
virtual |
virtual void getPosition
(
float *
x,
float *
y
)
virtual |
var getPosition
(
var
x,
var
y
)
virtual |
local getPosition
(
local
x,
local
y
)
virtual |
virtual float getPositionX
(
void
)
virtual |
var getPositionX
(
)
virtual |
local getPositionX
(
)
virtual |
virtual float getPositionY
(
void
)
virtual |
var getPositionY
(
)
virtual |
local getPositionY
(
)
virtual |
virtual float getRotation
(
)
virtual |
var getRotation
(
)
virtual |
local getRotation
(
)
virtual |
virtual float getRotationX
(
)
virtual |
Gets the X rotation (angle) of the node in degrees which performs a horizontal rotation skew.
- See Also
- setRotationX(float)
- Returns
- The X rotation in degrees.
var getRotationX
(
)
virtual |
Gets the X rotation (angle) of the node in degrees which performs a horizontal rotation skew.
- See Also
- setRotationX(float)
- Returns
- The X rotation in degrees.
local getRotationX
(
)
virtual |
Gets the X rotation (angle) of the node in degrees which performs a horizontal rotation skew.
- See Also
- setRotationX(float)
- Returns
- The X rotation in degrees.
virtual float getRotationY
(
)
virtual |
Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
- See Also
- setRotationY(float)
- Returns
- The Y rotation in degrees.
var getRotationY
(
)
virtual |
Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
- See Also
- setRotationY(float)
- Returns
- The Y rotation in degrees.
local getRotationY
(
)
virtual |
Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
- See Also
- setRotationY(float)
- Returns
- The Y rotation in degrees.
virtual float getScale
(
)
virtual |
Gets the scale factor of the node, when X and Y have the same scale factor.
- Warning
- Assert when m_fScaleX != m_fScaleY.
- See Also
- setScale(float)
- Returns
- The scale factor of the node.
Gets the scale factor of the node, when X and Y have the same scale factor.
- Warning
- Assert when m_fScaleX != m_fScaleY.
- See Also
- setScale(float)
- Returns
- The scale factor of the node.
local getScale
(
)
virtual |
Gets the scale factor of the node, when X and Y have the same scale factor.
- Warning
- Assert when m_fScaleX != m_fScaleY.
- See Also
- setScale(float)
- Returns
- The scale factor of the node.
virtual float getScaleX
(
)
virtual |
Returns the scale factor on X axis of this node.
- See Also
- setScaleX(float)
- Returns
- The scale factor on X axis.
var getScaleX
(
)
virtual |
Returns the scale factor on X axis of this node.
- See Also
- setScaleX(float)
- Returns
- The scale factor on X axis.
local getScaleX
(
)
virtual |
Returns the scale factor on X axis of this node.
- See Also
- setScaleX(float)
- Returns
- The scale factor on X axis.
virtual float getScaleY
(
)
virtual |
Returns the scale factor on Y axis of this node.
- See Also
- setScaleY(float)
- Returns
- The scale factor on Y axis.
var getScaleY
(
)
virtual |
Returns the scale factor on Y axis of this node.
- See Also
- setScaleY(float)
- Returns
- The scale factor on Y axis.
local getScaleY
(
)
virtual |
Returns the scale factor on Y axis of this node.
- See Also
- setScaleY(float)
- Returns
- The scale factor on Y axis.
virtual CCScheduler* getScheduler
(
)
virtual |
local getScheduler
(
)
virtual |
int getScriptHandler
(
)
inline |
Gets script handler for onEnter/onExit event.
This is an internal method. g
- See Also
- registerScriptHandler(int)
- Returns
- A number that indicates a lua function.
var getScriptHandler
(
)
inline |
Gets script handler for onEnter/onExit event.
This is an internal method. g
- See Also
- registerScriptHandler(int)
- Returns
- A number that indicates a lua function.
local getScriptHandler
(
)
inline |
Gets script handler for onEnter/onExit event.
This is an internal method. g
- See Also
- registerScriptHandler(int)
- Returns
- A number that indicates a lua function.
virtual CCGLProgram*
getShaderProgram
(
)
virtual |
Return the shader program currently used for this node.
- Returns
- The shader program currelty used for this node
var getShaderProgram
(
)
virtual |
Return the shader program currently used for this node.
- Returns
- The shader program currelty used for this node
local getShaderProgram
(
)
virtual |
Return the shader program currently used for this node.
- Returns
- The shader program currelty used for this node
virtual float getSkewX
(
)
virtual |
Returns the X skew angle of the node in degrees.
- See Also
- setSkewX(float)
- Returns
- The X skew angle of the node in degrees.
Returns the X skew angle of the node in degrees.
- See Also
- setSkewX(float)
- Returns
- The X skew angle of the node in degrees.
local getSkewX
(
)
virtual |
Returns the X skew angle of the node in degrees.
- See Also
- setSkewX(float)
- Returns
- The X skew angle of the node in degrees.
virtual float getSkewY
(
)
virtual |
Returns the Y skew angle of the node in degrees.
- See Also
- setSkewY(float)
- Returns
- The Y skew angle of the node in degrees.
Returns the Y skew angle of the node in degrees.
- See Also
- setSkewY(float)
- Returns
- The Y skew angle of the node in degrees.
local getSkewY
(
)
virtual |
Returns the Y skew angle of the node in degrees.
- See Also
- setSkewY(float)
- Returns
- The Y skew angle of the node in degrees.
virtual int getTag
(
)
const
virtual |
Returns a tag that is used to identify the node easily.
You can set tags to node then identify them easily.
#define TAG_PLAYER 1
#define TAG_MONSTER 2
#define TAG_BOSS 3
// set tags
node1->setTag(TAG_PLAYER);
node2->setTag(TAG_MONSTER);
node3->setTag(TAG_BOSS);
parent->addChild(node1);
parent->addChild(node2);
parent->addChild(node3);
// identify by tags
{
switch(node->getTag())
{
case TAG_PLAYER:
break;
case TAG_MONSTER:
break;
case TAG_BOSS:
break;
}
}
- Returns
- A interger that identifies the node.
Returns a tag that is used to identify the node easily.
You can set tags to node then identify them easily.
#define TAG_PLAYER 1
#define TAG_MONSTER 2
#define TAG_BOSS 3
// set tags
node1->setTag(TAG_PLAYER);
node2->setTag(TAG_MONSTER);
node3->setTag(TAG_BOSS);
parent->addChild(node1);
parent->addChild(node2);
parent->addChild(node3);
// identify by tags
{
switch(node->getTag())
{
case TAG_PLAYER:
break;
case TAG_MONSTER:
break;
case TAG_BOSS:
break;
}
}
- Returns
- A interger that identifies the node.
Returns a tag that is used to identify the node easily.
You can set tags to node then identify them easily.
#define TAG_PLAYER 1
#define TAG_MONSTER 2
#define TAG_BOSS 3
// set tags
node1->setTag(TAG_PLAYER);
node2->setTag(TAG_MONSTER);
node3->setTag(TAG_BOSS);
parent->addChild(node1);
parent->addChild(node2);
parent->addChild(node3);
// identify by tags
{
switch(node->getTag())
{
case TAG_PLAYER:
break;
case TAG_MONSTER:
break;
case TAG_BOSS:
break;
}
}
- Returns
- A interger that identifies the node.
virtual void* getUserData
(
)
virtual |
Returns a custom user data pointer.
You can set everything in UserData pointer, a data block, a structure or an object.
- Returns
- A custom user data pointer
local getUserData
(
)
virtual |
Returns a custom user data pointer.
You can set everything in UserData pointer, a data block, a structure or an object.
- Returns
- A custom user data pointer
virtual CCObject* getUserObject
(
)
virtual |
Returns a user assigned CCObject.
Similar to userData, but instead of holding a void* it holds an object
- Returns
- A user assigned CCObject
local getUserObject
(
)
virtual |
Returns a user assigned CCObject.
Similar to userData, but instead of holding a void* it holds an object
- Returns
- A user assigned CCObject
virtual float getVertexZ
(
)
virtual |
Gets OpenGL Z vertex of this node.
- See Also
- setVertexZ(float)
- Returns
- OpenGL Z vertex of this node
var getVertexZ
(
)
virtual |
Gets OpenGL Z vertex of this node.
- See Also
- setVertexZ(float)
- Returns
- OpenGL Z vertex of this node
local getVertexZ
(
)
virtual |
Gets OpenGL Z vertex of this node.
- See Also
- setVertexZ(float)
- Returns
- OpenGL Z vertex of this node
virtual int getZOrder
(
)
virtual |
Gets the Z order of this node.
- See Also
- setZOrder(int)
- Returns
- The Z order.
var getZOrder
(
)
virtual |
Gets the Z order of this node.
- See Also
- setZOrder(int)
- Returns
- The Z order.
local getZOrder
(
)
virtual |
Gets the Z order of this node.
- See Also
- setZOrder(int)
- Returns
- The Z order.
virtual void
ignoreAnchorPointForPosition
(
bool
ignore)
virtual |
Sets whether the anchor point will be (0,0) when you position this node.
This is an internal method, only used by CCLayer and CCScene. Don't call it outside framework. The default value is false, while in CCLayer and CCScene are true
- Parameters
-
ignore true if anchor point will be (0,0) when you position this node
- Todo:
- This method shoud be renamed as setIgnoreAnchorPointForPosition(bool) or something with "set"
Reimplemented in CCSprite.
var ignoreAnchorPointForPosition
(
var
ignore)
virtual |
Sets whether the anchor point will be (0,0) when you position this node.
This is an internal method, only used by CCLayer and CCScene. Don't call it outside framework. The default value is false, while in CCLayer and CCScene are true
- Parameters
-
ignore true if anchor point will be (0,0) when you position this node
- Todo:
- This method shoud be renamed as setIgnoreAnchorPointForPosition(bool) or something with "set"
Reimplemented in CCSprite.
local ignoreAnchorPointForPosition
(
local
ignore)
virtual |
Sets whether the anchor point will be (0,0) when you position this node.
This is an internal method, only used by CCLayer and CCScene. Don't call it outside framework. The default value is false, while in CCLayer and CCScene are true
- Parameters
-
ignore true if anchor point will be (0,0) when you position this node
- Todo:
- This method shoud be renamed as setIgnoreAnchorPointForPosition(bool) or something with "set"
Reimplemented in CCSprite.
virtual bool init
(
)
virtual |
Initializes the instance of CCNode.
- Returns
- Whether the initialization was successful.
Reimplemented in CCNodeRGBA, CCParticleSystem, CCMenuItemImage, CCLayerGradient, CCLayerColor, UIRectClippingNode, CCParticleRain, CCParticleSnow, CCLabelBMFont, CCLayerRGBA, CCParticleSmoke, CCParticleExplosion, CCSprite, CCParticleSpiral, CCParticleMeteor, CCLabelTTF, CCControl, CCParticleFlower, CCControlButton, CCSpriteBatchNode, CCScale9Sprite, CCParticleGalaxy, CCMenu, CCParticleSun, CCScrollView, CCLayer, CCArmature, CCParticleFireworks, CCBone, CCControlColourPicker, CCClippingNode, CCDrawNode, CCScene, UILayer, CCParticleFire, CCBatchNode, and ModalLayer.
Initializes the instance of CCNode.
- Returns
- Whether the initialization was successful.
Reimplemented in CCNodeRGBA, CCParticleSystem, CCMenuItemImage, CCLayerGradient, CCLayerColor, UIRectClippingNode, CCParticleRain, CCParticleSnow, CCLabelBMFont, CCLayerRGBA, CCParticleSmoke, CCParticleExplosion, CCSprite, CCParticleSpiral, CCParticleMeteor, CCLabelTTF, CCControl, CCParticleFlower, CCControlButton, CCSpriteBatchNode, CCScale9Sprite, CCParticleGalaxy, CCMenu, CCParticleSun, CCScrollView, CCLayer, CCArmature, CCParticleFireworks, CCBone, CCControlColourPicker, CCClippingNode, CCDrawNode, CCScene, UILayer, CCParticleFire, CCBatchNode, and ModalLayer.
Initializes the instance of CCNode.
- Returns
- Whether the initialization was successful.
Reimplemented in CCNodeRGBA, CCParticleSystem, CCMenuItemImage, CCLayerGradient, CCLayerColor, UIRectClippingNode, CCParticleRain, CCParticleSnow, CCLabelBMFont, CCLayerRGBA, CCParticleSmoke, CCParticleExplosion, CCSprite, CCParticleSpiral, CCParticleMeteor, CCLabelTTF, CCControl, CCParticleFlower, CCControlButton, CCSpriteBatchNode, CCScale9Sprite, CCParticleGalaxy, CCMenu, CCParticleSun, CCScrollView, CCLayer, CCArmature, CCParticleFireworks, CCBone, CCControlColourPicker, CCClippingNode, CCDrawNode, CCScene, UILayer, CCParticleFire, CCBatchNode, and ModalLayer.
virtual bool init
(
)
virtual |
virtual bool isCascadeColorEnabled
(
)
virtual |
whether or not color should be propagated to its children.
Implements CCRGBAProtocol.
var isCascadeColorEnabled
(
)
virtual |
whether or not color should be propagated to its children.
Implements CCRGBAProtocol.
local isCascadeColorEnabled
(
)
virtual |
whether or not color should be propagated to its children.
Implements CCRGBAProtocol.
virtual bool
isCascadeOpacityEnabled
(
)
virtual |
whether or not opacity should be propagated to its children.
Implements CCRGBAProtocol.
var isCascadeOpacityEnabled
(
)
virtual |
whether or not opacity should be propagated to its children.
Implements CCRGBAProtocol.
local isCascadeOpacityEnabled
(
)
virtual |
whether or not opacity should be propagated to its children.
Implements CCRGBAProtocol.
virtual bool
isIgnoreAnchorPointForPosition
(
)
virtual |
Gets whether the anchor point will be (0,0) when you position this node.
- See Also
- ignoreAnchorPointForPosition(bool)
- Returns
- true if the anchor point will be (0,0) when you position this node.
var isIgnoreAnchorPointForPosition
(
)
virtual |
Gets whether the anchor point will be (0,0) when you position this node.
- See Also
- ignoreAnchorPointForPosition(bool)
- Returns
- true if the anchor point will be (0,0) when you position this node.
local
isIgnoreAnchorPointForPosition
(
)
virtual |
Gets whether the anchor point will be (0,0) when you position this node.
- See Also
- ignoreAnchorPointForPosition(bool)
- Returns
- true if the anchor point will be (0,0) when you position this node.
virtual bool isOpacityModifyRGB
(
)
inlinevirtual |
Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity)
- Returns
- Returns opacity modify flag.
Implements CCRGBAProtocol.
Reimplemented in CCSprite, CCScale9Sprite, CCAtlasNode, CCMotionStreak, and CCSkeleton.
var isOpacityModifyRGB
(
)
inlinevirtual |
Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity)
- Returns
- Returns opacity modify flag.
Implements CCRGBAProtocol.
Reimplemented in CCSprite, CCScale9Sprite, CCAtlasNode, CCMotionStreak, and CCSkeleton.
local isOpacityModifyRGB
(
)
inlinevirtual |
Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity)
- Returns
- Returns opacity modify flag.
Implements CCRGBAProtocol.
Reimplemented in CCSprite, CCScale9Sprite, CCAtlasNode, CCMotionStreak, and CCSkeleton.
virtual bool isRunning
(
)
virtual |
Returns whether or not the node accepts event callbacks.
Running means the node accept event callbacks like onEnter(), onExit(), update()
- Returns
- Whether or not the node is running.
var isRunning
(
)
virtual |
Returns whether or not the node accepts event callbacks.
Running means the node accept event callbacks like onEnter(), onExit(), update()
- Returns
- Whether or not the node is running.
local isRunning
(
)
virtual |
Returns whether or not the node accepts event callbacks.
Running means the node accept event callbacks like onEnter(), onExit(), update()
- Returns
- Whether or not the node is running.
Checks whether a selector is scheduled.
- Parameters
-
selector A function selector
- Returns
- Whether the funcion selector is scheduled.
virtual bool isVisible
(
)
virtual |
Determines if the node is visible.
- See Also
- setVisible(bool)
- Returns
- true if the node is visible, false if the node is hidden.
var isVisible
(
)
virtual |
Determines if the node is visible.
- See Also
- setVisible(bool)
- Returns
- true if the node is visible, false if the node is hidden.
local isVisible
(
)
virtual |
Determines if the node is visible.
- See Also
- setVisible(bool)
- Returns
- true if the node is visible, false if the node is hidden.
virtual CCAffineTransform
nodeToParentTransform
(
void
)
virtual |
Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
The matrix is in Pixels.
Reimplemented in CCArmature, and CCPhysicsSprite.
var nodeToParentTransform
(
)
virtual |
Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
The matrix is in Pixels.
Reimplemented in CCArmature, and CCPhysicsSprite.
local nodeToParentTransform
(
)
virtual |
Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
The matrix is in Pixels.
Reimplemented in CCArmature, and CCPhysicsSprite.
virtual CCAffineTransform
nodeToWorldTransform
(
void
)
virtual |
Returns the world affine transform matrix.
The matrix is in Pixels.
Reimplemented in CCBone, and CCSkin.
var nodeToWorldTransform
(
)
virtual |
Returns the world affine transform matrix.
The matrix is in Pixels.
Reimplemented in CCBone, and CCSkin.
local nodeToWorldTransform
(
)
virtual |
Returns the world affine transform matrix.
The matrix is in Pixels.
Reimplemented in CCBone, and CCSkin.
unsigned int numberOfRunningActions
(
void
)
Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).
Composable actions are counted as 1 action. Example: If you are running 1 Sequence of 7 actions, it will return 1. If you are running 7 Sequences of 2 actions, it will return 7.
- Todo:
- Rename to getNumberOfRunningActions()
- Returns
- The number of actions that are running plus the ones that are schedule to run
var numberOfRunningActions
(
)
Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).
Composable actions are counted as 1 action. Example: If you are running 1 Sequence of 7 actions, it will return 1. If you are running 7 Sequences of 2 actions, it will return 7.
- Todo:
- Rename to getNumberOfRunningActions()
- Returns
- The number of actions that are running plus the ones that are schedule to run
local numberOfRunningActions
(
)
Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).
Composable actions are counted as 1 action. Example: If you are running 1 Sequence of 7 actions, it will return 1. If you are running 7 Sequences of 2 actions, it will return 7.
- Todo:
- Rename to getNumberOfRunningActions()
- Returns
- The number of actions that are running plus the ones that are schedule to run
virtual void onEnter
(
)
virtual |
Event callback that is invoked every time when CCNode enters the 'stage'.
If the CCNode enters the 'stage' with a transition, this event is called when the transition starts. During onEnter you can't access a "sister/brother" node. If you override onEnter, you shall call its parent's one, e.g., CCNode::onEnter().
Reimplemented in CCTransitionFadeTR, CCTransitionSplitCols, CCTransitionTurnOffTiles, CCTransitionCrossFade, CCTransitionFade, CCTransitionZoomFlipAngular, CCTransitionZoomFlipY, CCTransitionZoomFlipX, CCTransitionFlipAngular, CCTransitionFlipY, CCTransitionFlipX, CCTransitionShrinkGrow, CCEditBox, CCTransitionSlideInL, CCTransitionMoveInL, CCTransitionJumpZoom, CCTransitionRotoZoom, CCControl, CCTransitionScene, CCTransitionPageTurn, CCLayer, CCClippingNode, UILayer, CCTransitionProgress, and UICCTextField.
virtual void
onEnterTransitionDidFinish
(
)
virtual |
virtual void onExit
(
)
virtual |
Event callback that is invoked every time the CCNode leaves the 'stage'.
If the CCNode leaves the 'stage' with a transition, this event is called when the transition finishes. During onExit you can't access a sibling node. If you override onExit, you shall call its parent's one, e.g., CCNode::onExit().
Reimplemented in CCTransitionCrossFade, CCTransitionFade, CCEditBox, CCMenu, CCControl, CCTransitionScene, CCClippingNode, CCLayer, UILayer, and CCTransitionProgress.
virtual void
onExitTransitionDidStart
(
)
virtual |
Event callback that is called every time the CCNode leaves the 'stage'.
If the CCNode leaves the 'stage' with a transition, this callback is called when the transition starts.
Reimplemented in CCClippingNode.
virtual CCAffineTransform
parentToNodeTransform
(
void
)
virtual |
Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
The matrix is in Pixels.
var parentToNodeTransform
(
)
virtual |
Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
The matrix is in Pixels.
local parentToNodeTransform
(
)
virtual |
Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
The matrix is in Pixels.
void pauseSchedulerAndActions
(
void
)
Pauses all scheduled selectors and actions.
This method is called internally by onExit
virtual void registerScriptHandler
(
int
handler)
virtual |
Registers a script function that will be called in onEnter() & onExit() seires functions.
This handler will be removed automatically after onExit() called.
-- lua sample
local function sceneEventHandler(eventType)
-- do something
-- do something
end
end
- Warning
- This method is for internal usage, don't call it manually.
- Todo:
- Perhaps we should rename it to get/set/removeScriptHandler acoording to the function name style.
- Parameters
-
handler A number that indicates a lua function.
var registerScriptHandler
(
var
handler)
virtual |
Registers a script function that will be called in onEnter() & onExit() seires functions.
This handler will be removed automatically after onExit() called.
-- lua sample
local function sceneEventHandler(eventType)
-- do something
-- do something
end
end
- Warning
- This method is for internal usage, don't call it manually.
- Todo:
- Perhaps we should rename it to get/set/removeScriptHandler acoording to the function name style.
- Parameters
-
handler A number that indicates a lua function.
local registerScriptHandler
(
local
handler)
virtual |
Registers a script function that will be called in onEnter() & onExit() seires functions.
This handler will be removed automatically after onExit() called.
-- lua sample
local function sceneEventHandler(eventType)
-- do something
-- do something
end
end
- Warning
- This method is for internal usage, don't call it manually.
- Todo:
- Perhaps we should rename it to get/set/removeScriptHandler acoording to the function name style.
- Parameters
-
handler A number that indicates a lua function.
virtual void removeAllChildren
(
)
virtual |
var removeAllChildren
(
)
virtual |
local removeAllChildren
(
)
virtual |
virtual void
removeAllChildrenWithCleanup
(
bool
cleanup)
virtual |
Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
- Parameters
-
cleanup true if all running actions on all children nodes should be cleanup, false oterwise.
Reimplemented in CCSprite, CCSpriteBatchNode, CCParticleBatchNode, and CCParallaxNode.
var removeAllChildren
(
var
cleanup)
virtual |
Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
- Parameters
-
cleanup true if all running actions on all children nodes should be cleanup, false oterwise.
Reimplemented in CCSprite, CCSpriteBatchNode, CCParticleBatchNode, and CCParallaxNode.
local removeAllChildrenWithCleanup
(
local
cleanup)
virtual |
Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
- Parameters
-
cleanup true if all running actions on all children nodes should be cleanup, false oterwise.
Reimplemented in CCSprite, CCSpriteBatchNode, CCParticleBatchNode, and CCParallaxNode.
virtual void removeAllComponents
(
)
virtual |
var removeAllComponents
(
)
virtual |
local removeAllComponents
(
)
virtual |
virtual void removeChild
(
CCNode *
child)
virtual |
Removes a child from the container with a cleanup.
- See Also
- removeChild(CCNode, bool)
- Parameters
-
child The child node which will be removed.
var removeChild
(
var
child)
virtual |
Removes a child from the container with a cleanup.
- See Also
- removeChild(CCNode, bool)
- Parameters
-
child The child node which will be removed.
local removeChild
(
local
child)
virtual |
Removes a child from the container with a cleanup.
- See Also
- removeChild(CCNode, bool)
- Parameters
-
child The child node which will be removed.
virtual void removeChild
(
CCNode *
child,
bool
cleanup
)
virtual |
var removeChild
(
var
child,
var
cleanup
)
virtual |
local removeChild
(
local
child,
local
cleanup
)
virtual |
virtual void removeChildByTag
(
int
tag)
virtual |
Removes a child from the container by tag value with a cleanup.
- See Also
- removeChildByTag(int, bool)
- Parameters
-
tag An interger number that identifies a child node
var removeChildByTag
(
var
tag)
virtual |
Removes a child from the container by tag value with a cleanup.
- See Also
- removeChildByTag(int, bool)
- Parameters
-
tag An interger number that identifies a child node
local removeChildByTag
(
local
tag)
virtual |
Removes a child from the container by tag value with a cleanup.
- See Also
- removeChildByTag(int, bool)
- Parameters
-
tag An interger number that identifies a child node
virtual void removeChildByTag
(
int
tag,
bool
cleanup
)
virtual |
Removes a child from the container by tag value.
It will also cleanup all running actions depending on the cleanup parameter
- Parameters
-
tag An interger number that identifies a child node
cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise.
var removeChildByTag
(
var
tag,
var
cleanup
)
virtual |
Removes a child from the container by tag value.
It will also cleanup all running actions depending on the cleanup parameter
- Parameters
-
tag An interger number that identifies a child node
cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise.
local removeChildByTag
(
local
tag,
local
cleanup
)
virtual |
Removes a child from the container by tag value.
It will also cleanup all running actions depending on the cleanup parameter
- Parameters
-
tag An interger number that identifies a child node
cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise.
virtual bool removeComponent
(
const char *
pName)
virtual |
removes a component by its name
var removeComponent
(
var
pName)
virtual |
removes a component by its name
local removeComponent
(
local
pName)
virtual |
removes a component by its name
virtual void removeFromParent
(
)
virtual |
var removeFromParent
(
)
virtual |
local removeFromParent
(
)
virtual |
virtual void
removeFromParentAndCleanup
(
bool
cleanup)
virtual |
Removes this node itself from its parent node.
If the node orphan, then nothing happens.
- Parameters
-
cleanup true if all actions and callbacks on this node should be removed, false otherwise.
var removeFromParent
(
var
cleanup)
virtual |
Removes this node itself from its parent node.
If the node orphan, then nothing happens.
- Parameters
-
cleanup true if all actions and callbacks on this node should be removed, false otherwise.
local removeFromParentAndCleanup
(
local
cleanup)
virtual |
Removes this node itself from its parent node.
If the node orphan, then nothing happens.
- Parameters
-
cleanup true if all actions and callbacks on this node should be removed, false otherwise.
virtual void reorderChild
(
CCNode *
child,
int
zOrder
)
virtual |
var reorderChild
(
var
child,
var
zOrder
)
virtual |
local reorderChild
(
local
child,
local
zOrder
)
virtual |
void resumeSchedulerAndActions
(
void
)
Resumes all scheduled selectors and actions.
This method is called internally by onEnter
CCAction* runAction
(
CCAction *
action)
Executes an action, and returns the action that is executed.
This node becomes the action's target. Refer to CCAction::getTarget()
- Warning
- Actions don't retain their target.
- Returns
- An Action pointer
var runAction
(
var
action)
Executes an action, and returns the action that is executed.
This node becomes the action's target. Refer to CCAction::getTarget()
- Warning
- Actions don't retain their target.
- Returns
- An Action pointer
local runAction
(
local
action)
Executes an action, and returns the action that is executed.
This node becomes the action's target. Refer to CCAction::getTarget()
- Warning
- Actions don't retain their target.
- Returns
- An Action pointer
float
interval,
unsigned int
repeat,
float
delay
)
Schedules a custom selector.
If the selector is already scheduled, then the interval parameter will be updated without scheduling it again.
// firstly, implement a schedule function
void MyNode::TickMe(float dt);
// wrap this function into a selector via schedule_selector marco.
- Parameters
-
interval Tick interval in seconds. 0 means tick every frame. If interval = 0, it's recommended to use
scheduleUpdate() instead.
repeat The selector will be excuted (repeat + 1) times, you can use kCCRepeatForever for tick infinitely.
delay The amount of time that the first tick will wait before execution.
var schedule
(
var
selector,
var
interval,
var
repeat,
var
delay
)
Schedules a custom selector.
If the selector is already scheduled, then the interval parameter will be updated without scheduling it again.
// firstly, implement a schedule function
void MyNode::TickMe(float dt);
// wrap this function into a selector via schedule_selector marco.
- Parameters
-
interval Tick interval in seconds. 0 means tick every frame. If interval = 0, it's recommended to use
scheduleUpdate() instead.
repeat The selector will be excuted (repeat + 1) times, you can use kCCRepeatForever for tick infinitely.
delay The amount of time that the first tick will wait before execution.
var schedule
(
var
selector,
var
interval
)
var schedule
(
var
selector)
Schedules a selector that runs only once, with a delay of 0 or larger.
- See Also
- schedule(SEL_SCHEDULE, float, unsigned int, float)
- Parameters
-
selector A function wrapped as a selector
delay The amount of time that the first tick will wait before execution.
var scheduleOnce
(
var
selector,
var
delay
)
Schedules a selector that runs only once, with a delay of 0 or larger.
- See Also
- schedule(SEL_SCHEDULE, float, unsigned int, float)
- Parameters
-
selector A function wrapped as a selector
delay The amount of time that the first tick will wait before execution.
void scheduleUpdate
(
void
)
Schedules the "update" method.
It will use the order number 0. This method will be called every frame. Scheduled methods with a lower order value will be called before the ones that have a higher order value. Only one "update" method could be scheduled per node.
Schedules the "update" method.
It will use the order number 0. This method will be called every frame. Scheduled methods with a lower order value will be called before the ones that have a higher order value. Only one "update" method could be scheduled per node.
void scheduleUpdateWithPriority
(
int
priority)
Schedules the "update" method with a custom priority.
This selector will be called every frame. Scheduled methods with a lower priority will be called before the ones that have a higher value. Only one "update" selector could be scheduled per node (You can't have 2 'update' selectors).
var scheduleUpdateWithPriority
(
var
priority)
Schedules the "update" method with a custom priority.
This selector will be called every frame. Scheduled methods with a lower priority will be called before the ones that have a higher value. Only one "update" selector could be scheduled per node (You can't have 2 'update' selectors).
void scheduleUpdateWithPriorityLua
(
int
nHandler,
int
priority
)
Schedules for lua script.
local scheduleUpdateWithPriorityLua
(
local
nHandler,
local
priority
)
Schedules for lua script.
Sets the CCActionManager object that is used by all actions.
- Warning
- If you set a new CCActionManager, then previously created actions will be removed.
- Parameters
-
var setActionManager
(
var
actionManager)
virtual |
Sets the CCActionManager object that is used by all actions.
- Warning
- If you set a new CCActionManager, then previously created actions will be removed.
- Parameters
-
local setActionManager
(
local
actionManager)
virtual |
Sets the CCActionManager object that is used by all actions.
- Warning
- If you set a new CCActionManager, then previously created actions will be removed.
- Parameters
-
Sets the additional transform.
- Note
- The additional transform will be concatenated at the end of nodeToParentTransform. It could be used to simulate
parent-child relationship between two nodes (e.g. one is in BatchNode, another isn't). // create a batchNode
// create two sprites, spriteA will be added to batchNode, they are using different textures.
batch->addChild(spriteA);
// We can't make spriteB as spriteA's child since they use different textures. So just add it to layer.
// But we want to simulate `parent-child` relationship for these two node.
//position
spriteA->setPosition(
ccp(200, 200));
// Gets the spriteA's transform.
CCAffineTransform t = spriteA->nodeToParentTransform();
// Sets the additional transform to spriteB, spriteB's postion will based on its pseudo parent i.e. spriteA.
spriteB->setAdditionalTransform(t);
//scale
spriteA->setScale(2);
// Gets the spriteA's transform.
t = spriteA->nodeToParentTransform();
// Sets the additional transform to spriteB, spriteB's scale will based on its pseudo parent i.e. spriteA.
spriteB->setAdditionalTransform(t);
//rotation
spriteA->setRotation(20);
// Gets the spriteA's transform.
t = spriteA->nodeToParentTransform();
// Sets the additional transform to spriteB, spriteB's rotation will based on its pseudo parent i.e. spriteA.
spriteB->setAdditionalTransform(t);
var setAdditionalTransform
(
var
additionalTransform)
Sets the additional transform.
- Note
- The additional transform will be concatenated at the end of nodeToParentTransform. It could be used to simulate
parent-child relationship between two nodes (e.g. one is in BatchNode, another isn't). // create a batchNode
// create two sprites, spriteA will be added to batchNode, they are using different textures.
batch->addChild(spriteA);
// We can't make spriteB as spriteA's child since they use different textures. So just add it to layer.
// But we want to simulate `parent-child` relationship for these two node.
//position
spriteA->setPosition(
ccp(200, 200));
// Gets the spriteA's transform.
CCAffineTransform t = spriteA->nodeToParentTransform();
// Sets the additional transform to spriteB, spriteB's postion will based on its pseudo parent i.e. spriteA.
spriteB->setAdditionalTransform(t);
//scale
spriteA->setScale(2);
// Gets the spriteA's transform.
t = spriteA->nodeToParentTransform();
// Sets the additional transform to spriteB, spriteB's scale will based on its pseudo parent i.e. spriteA.
spriteB->setAdditionalTransform(t);
//rotation
spriteA->setRotation(20);
// Gets the spriteA's transform.
t = spriteA->nodeToParentTransform();
// Sets the additional transform to spriteB, spriteB's rotation will based on its pseudo parent i.e. spriteA.
spriteB->setAdditionalTransform(t);
local setAdditionalTransform
(
local
additionalTransform)
Sets the additional transform.
- Note
- The additional transform will be concatenated at the end of nodeToParentTransform. It could be used to simulate
parent-child relationship between two nodes (e.g. one is in BatchNode, another isn't). // create a batchNode
// create two sprites, spriteA will be added to batchNode, they are using different textures.
batch->addChild(spriteA);
// We can't make spriteB as spriteA's child since they use different textures. So just add it to layer.
// But we want to simulate `parent-child` relationship for these two node.
//position
spriteA->setPosition(
ccp(200, 200));
// Gets the spriteA's transform.
CCAffineTransform t = spriteA->nodeToParentTransform();
// Sets the additional transform to spriteB, spriteB's postion will based on its pseudo parent i.e. spriteA.
spriteB->setAdditionalTransform(t);
//scale
spriteA->setScale(2);
// Gets the spriteA's transform.
t = spriteA->nodeToParentTransform();
// Sets the additional transform to spriteB, spriteB's scale will based on its pseudo parent i.e. spriteA.
spriteB->setAdditionalTransform(t);
//rotation
spriteA->setRotation(20);
// Gets the spriteA's transform.
t = spriteA->nodeToParentTransform();
// Sets the additional transform to spriteB, spriteB's rotation will based on its pseudo parent i.e. spriteA.
spriteB->setAdditionalTransform(t);
virtual void setAnchorPoint
(
const
CCPoint &
anchorPoint)
virtual |
Sets the anchor point in percent.
anchorPoint is the point around which all transformations and positioning manipulations take place. It's like a pin in the node where it is "attached" to its parent. The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner. But you can use values higher than (1,1) and lower than (0,0) too. The default anchorPoint is (0.5,0.5), so it starts in the center of the node.
- Parameters
-
anchorPoint The anchor point of node.
Reimplemented in CCEditBox, CCSprite, and CCLabelBMFont.
var setAnchorPoint
(
var
anchorPoint)
virtual |
Sets the anchor point in percent.
anchorPoint is the point around which all transformations and positioning manipulations take place. It's like a pin in the node where it is "attached" to its parent. The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner. But you can use values higher than (1,1) and lower than (0,0) too. The default anchorPoint is (0.5,0.5), so it starts in the center of the node.
- Parameters
-
anchorPoint The anchor point of node.
Reimplemented in CCEditBox, CCSprite, and CCLabelBMFont.
local setAnchorPoint
(
local
anchorPoint)
virtual |
Sets the anchor point in percent.
anchorPoint is the point around which all transformations and positioning manipulations take place. It's like a pin in the node where it is "attached" to its parent. The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner. But you can use values higher than (1,1) and lower than (0,0) too. The default anchorPoint is (0.5,0.5), so it starts in the center of the node.
- Parameters
-
anchorPoint The anchor point of node.
Reimplemented in CCEditBox, CCSprite, and CCLabelBMFont.
virtual void setCascadeColorEnabled
(
bool
cascadeColorEnabled)
virtual |
var setCascadeColorEnabled
(
var
cascadeColorEnabled)
virtual |
local setCascadeColorEnabled
(
local
cascadeColorEnabled)
virtual |
virtual void
setCascadeOpacityEnabled
(
bool
cascadeOpacityEnabled)
virtual |
var setCascadeOpacityEnabled
(
var
cascadeOpacityEnabled)
virtual |
local setCascadeOpacityEnabled
(
local
cascadeOpacityEnabled)
virtual |
virtual void setColor
(
const
ccColor3B &
color)
virtual |
var setColor
(
var
color)
virtual |
local setColor
(
local
color)
virtual |
virtual void setContentSize
(
const
CCSize &
contentSize)
virtual |
Sets the untransformed size of the node.
The contentSize remains the same no matter the node is scaled or rotated. All nodes has a size. Layer and Scene has the same size of the screen.
- Parameters
-
contentSize The untransformed size of the node.
Reimplemented in CCEditBox, CCLayerColor, CCScrollView, and CCScale9Sprite.
var setContentSize
(
var
contentSize)
virtual |
Sets the untransformed size of the node.
The contentSize remains the same no matter the node is scaled or rotated. All nodes has a size. Layer and Scene has the same size of the screen.
- Parameters
-
contentSize The untransformed size of the node.
Reimplemented in CCEditBox, CCLayerColor, CCScrollView, and CCScale9Sprite.
local setContentSize
(
local
contentSize)
virtual |
Sets the untransformed size of the node.
The contentSize remains the same no matter the node is scaled or rotated. All nodes has a size. Layer and Scene has the same size of the screen.
- Parameters
-
contentSize The untransformed size of the node.
Reimplemented in CCEditBox, CCLayerColor, CCScrollView, and CCScale9Sprite.
Sets the state of OpenGL server side.
- Parameters
-
glServerState The state of OpenGL server side.
local setGLServerState
(
local
glServerState)
virtual |
Sets the state of OpenGL server side.
- Parameters
-
glServerState The state of OpenGL server side.
Changes a grid object that is used when applying effects.
- Parameters
-
A CCGrid object that is used when applying effects
var setGrid
(
var
pGrid)
virtual |
Changes a grid object that is used when applying effects.
- Parameters
-
A CCGrid object that is used when applying effects
local setGrid
(
local
pGrid)
virtual |
Changes a grid object that is used when applying effects.
- Parameters
-
A CCGrid object that is used when applying effects
virtual void setOpacity
(
GLubyte
opacity)
virtual |
var setOpacity
(
var
opacity)
virtual |
local setOpacity
(
local
opacity)
virtual |
virtual void setOpacityModifyRGB
(
bool
bValue)
inlinevirtual |
Changes the OpacityModifyRGB property.
If thie property is set to true, then the rendered color will be affected by opacity. Normally, r = r * opacity/255, g = g * opacity/255, b = b * opacity/255.
- Parameters
-
bValue true then the opacity will be applied as: glColor(R,G,B,opacity); false then the opacity will be applied as: glColor(opacity, opacity, opacity, opacity);
Implements CCRGBAProtocol.
Reimplemented in CCSprite, CCScale9Sprite, CCAtlasNode, CCMotionStreak, and CCSkeleton.
var setOpacityModifyRGB
(
var
bValue)
inlinevirtual |
Changes the OpacityModifyRGB property.
If thie property is set to true, then the rendered color will be affected by opacity. Normally, r = r * opacity/255, g = g * opacity/255, b = b * opacity/255.
- Parameters
-
bValue true then the opacity will be applied as: glColor(R,G,B,opacity); false then the opacity will be applied as: glColor(opacity, opacity, opacity, opacity);
Implements CCRGBAProtocol.
Reimplemented in CCSprite, CCScale9Sprite, CCAtlasNode, CCMotionStreak, and CCSkeleton.
local setOpacityModifyRGB
(
local
bValue)
inlinevirtual |
Changes the OpacityModifyRGB property.
If thie property is set to true, then the rendered color will be affected by opacity. Normally, r = r * opacity/255, g = g * opacity/255, b = b * opacity/255.
- Parameters
-
bValue true then the opacity will be applied as: glColor(R,G,B,opacity); false then the opacity will be applied as: glColor(opacity, opacity, opacity, opacity);
Implements CCRGBAProtocol.
Reimplemented in CCSprite, CCScale9Sprite, CCAtlasNode, CCMotionStreak, and CCSkeleton.
virtual void setOrderOfArrival
(
unsigned int
uOrderOfArrival)
virtual |
Sets the arrival order when this node has a same ZOrder with other children.
A node which called addChild subsequently will take a larger arrival order, If two children have the same Z order, the child with larger arrival order will be drawn later.
- Warning
- This method is used internally for zOrder sorting, don't change this manually
- Parameters
-
uOrderOfArrival The arrival order.
var setOrderOfArrival
(
var
uOrderOfArrival)
virtual |
Sets the arrival order when this node has a same ZOrder with other children.
A node which called addChild subsequently will take a larger arrival order, If two children have the same Z order, the child with larger arrival order will be drawn later.
- Warning
- This method is used internally for zOrder sorting, don't change this manually
- Parameters
-
uOrderOfArrival The arrival order.
local setOrderOfArrival
(
local
uOrderOfArrival)
virtual |
Sets the arrival order when this node has a same ZOrder with other children.
A node which called addChild subsequently will take a larger arrival order, If two children have the same Z order, the child with larger arrival order will be drawn later.
- Warning
- This method is used internally for zOrder sorting, don't change this manually
- Parameters
-
uOrderOfArrival The arrival order.
virtual void setParent
(
CCNode *
parent)
virtual |
Sets the parent node.
- Parameters
-
parent A pointer to the parnet node
var setParent
(
var
parent)
virtual |
Sets the parent node.
- Parameters
-
parent A pointer to the parnet node
local setParent
(
local
parent)
virtual |
Sets the parent node.
- Parameters
-
parent A pointer to the parnet node
virtual void setPosition
(
const
CCPoint &
position)
virtual |
Changes the position (x,y) of the node in OpenGL coordinates.
Usually we use ccp(x,y) to compose CCPoint object. The original point (0,0) is at the left-bottom corner of screen. For example, this codesnip sets the node in the center of screen.
node->setPosition(
ccp(size.width/2, size.height/2) )
- Parameters
-
position The position (x,y) of the node in OpenGL coordinates
Reimplemented in CCEditBox, CCSprite, CCPhysicsSprite, and CCMotionStreak.
local setPosition
(
local
position)
virtual |
Changes the position (x,y) of the node in OpenGL coordinates.
Usually we use ccp(x,y) to compose CCPoint object. The original point (0,0) is at the left-bottom corner of screen. For example, this codesnip sets the node in the center of screen.
node->setPosition(
ccp(size.width/2, size.height/2) )
- Parameters
-
position The position (x,y) of the node in OpenGL coordinates
Reimplemented in CCEditBox, CCSprite, CCPhysicsSprite, and CCMotionStreak.
virtual void setPosition
(
float
x,
float
y
)
virtual |
Sets position in a more efficient way.
Passing two numbers (x,y) is much efficient than passing CCPoint object. This method is binded to lua and javascript. Passing a number is 10 times faster than passing a object from lua to c++
// sample code in lua
local pos = node::getPosition() -- returns CCPoint object from C++
- Parameters
-
x X coordinate for position
y Y coordinate for position
local setPosition
(
local
x,
local
y
)
virtual |
Sets position in a more efficient way.
Passing two numbers (x,y) is much efficient than passing CCPoint object. This method is binded to lua and javascript. Passing a number is 10 times faster than passing a object from lua to c++
// sample code in lua
local pos = node::getPosition() -- returns CCPoint object from C++
- Parameters
-
x X coordinate for position
y Y coordinate for position
virtual void setPositionX
(
float
x)
virtual |
Gets/Sets x or y coordinate individually for position.
These methods are used in Lua and Javascript Bindings
var setPositionX
(
var
x)
virtual |
Gets/Sets x or y coordinate individually for position.
These methods are used in Lua and Javascript Bindings
local setPositionX
(
local
x)
virtual |
Gets/Sets x or y coordinate individually for position.
These methods are used in Lua and Javascript Bindings
virtual void setPositionY
(
float
y)
virtual |
var setPositionY
(
var
y)
virtual |
local setPositionY
(
local
y)
virtual |
virtual void setRotation
(
float
fRotation)
|