Class cc.Action
- Defined in: CCAction.js
- Extends cc.Class
Constructor Attributes | Constructor Name and Description |
---|---|
Base class for cc.Action objects.
|
Method Summary
Class Detail
cc.Action()
Base class for cc.Action objects.
Method Detail
-
{cc.Action} clone()returns a clone of action
- Returns:
- {cc.Action}
-
{object} copy()to copy object with deep copy.
- Returns:
- {object}
-
Allocates and initializes the action
// example var action = cc.Action.create();
- Returns:
- {cc.Action}
-
{String} description()
- Returns:
- {String}
-
{Object} getCenter()get the center vector values int points (return an object like {x:1,y:1,z:1} in HTML5)
Defined in: CCCamera.js.- Returns:
- {Object}
-
{Object} getCenterXYZ(centerX, centerY, centerZ)get the center vector values int points (return an object like {x:1,y:1,z:1} in HTML5)
Defined in: CCCamera.js.- Parameters:
- {Number} centerX
- {Number} centerY
- {Number} centerZ
- Deprecated:
- This function will be deprecated sooner or later.
- Returns:
- {Object}
-
{Object} getEye()get the eye vector values in points (return an object like {x:1,y:1,z:1} in HTML5)
Defined in: CCCamera.js.- Returns:
- {Object}
-
{Object} getEyeXYZ(eyeX, eyeY, eyeZ)get the eye vector values in points (return an object like {x:1,y:1,z:1} in HTML5)
Defined in: CCCamera.js.- Parameters:
- {Number} eyeX
- {Number} eyeY
- {Number} eyeZ
- Deprecated:
- This function will be deprecated sooner or later.
- Returns:
- {Object}
-
{cc.Node} getOriginalTarget()
- Returns:
- {cc.Node}
-
{Number} getTag()
- Returns:
- {Number}
-
{cc.Node} getTarget()
- Returns:
- {cc.Node}
-
{Object} getUp()get the up vector values (return an object like {x:1,y:1,z:1} in HTML5)
Defined in: CCCamera.js.- Returns:
- {Object}
-
{Object} getUpXYZ(upX, upY, upZ)get the up vector values (return an object like {x:1,y:1,z:1} in HTML5)
Defined in: CCCamera.js.- Parameters:
- {Number} upX
- {Number} upY
- {Number} upZ
- Deprecated:
- This function will be deprecated sooner or later.
- Returns:
- {Object}
-
{Boolean} isDirty()get the dirty value
Defined in: CCCamera.js.- Returns:
- {Boolean}
-
{Boolean} isDone()return true if the action has finished
- Returns:
- {Boolean}
-
locate()Sets the camera using gluLookAt using its eye, center and up_vector
Defined in: CCCamera.js. -
restore()sets the camera in the default position
Defined in: CCCamera.js. -
retain()Currently JavaScript Bindigns (JSB), in some cases, needs to use retain and release. This is a bug in JSB, and the ugly workaround is to use retain/release. So, these 2 methods were added to be compatible with JSB. This is a hack, and should be removed once JSB fixes the retain/release bug
-
setCenter(centerX, centerY, centerZ)sets the center values in points
Defined in: CCCamera.js.- Parameters:
- {Number} centerX
- {Number} centerY
- {Number} centerZ
-
setCenterXYZ(centerX, centerY, centerZ)sets the center values in points
Defined in: CCCamera.js.- Parameters:
- {Number} centerX
- {Number} centerY
- {Number} centerZ
- Deprecated:
- This function will be deprecated sooner or later.
-
setDirty(value)sets the dirty value
Defined in: CCCamera.js.- Parameters:
- value
-
setEye(eyeX, eyeY, eyeZ)sets the eye values in points
Defined in: CCCamera.js.- Parameters:
- {Number} eyeX
- {Number} eyeY
- {Number} eyeZ
-
setEyeXYZ(eyeX, eyeY, eyeZ)sets the eye values in points
Defined in: CCCamera.js.- Parameters:
- {Number} eyeX
- {Number} eyeY
- {Number} eyeZ
- Deprecated:
- This function will be deprecated sooner or later.
-
setOriginalTarget(originalTarget)Set the original target, since target can be nil.
Is the target that were used to run the action.
Unless you are doing something complex, like cc.ActionManager, you should NOT call this method.
The target is 'assigned', it is not 'retained'.
- Parameters:
- {cc.Node} originalTarget
-
setTag(tag)
- Parameters:
- {Number} tag
-
setTarget(target)The action will modify the target properties.
- Parameters:
- {cc.Node} target
-
setUp(upX, upY, upZ)sets the up values
Defined in: CCCamera.js.- Parameters:
- {Number} upX
- {Number} upY
- {Number} upZ
-
setUpXYZ(upX, upY, upZ)sets the up values
Defined in: CCCamera.js.- Parameters:
- {Number} upX
- {Number} upY
- {Number} upZ
- Deprecated:
- This function will be deprecated sooner or later.
-
startWithTarget(target)called before the action start. It will also set the target.
- Parameters:
- {cc.Node} target
-
step(dt)called every frame with it's delta time. DON'T override unless you know what you are doing.
- Parameters:
- {Number} dt
-
stop()called after the action has finished. It will set the 'target' to nil. IMPORTANT: You should never call "action stop" manually. Instead, use: "target.stopAction(action);"
-
update(time)
called once per frame. time a value between 0 and 1
For example:
- 0 means that the action just started
- 0.5 means that the action is in the middle
- 1 means that the action is over- Parameters:
- {Number} time