Class cc.BezierBy

Class Summary
Constructor Attributes Constructor Name and Description
 
cc.BezierBy(t, c)
An action that moves the target with a cubic Bezier curve by a certain distance.

Method Summary

Class Detail

cc.BezierBy(t, c)
An action that moves the target with a cubic Bezier curve by a certain distance. Relative to its movement.
var bezier = [cc.p(0, windowSize.height / 2), cc.p(300, -windowSize.height / 2), cc.p(300, 100)];
var bezierForward = new cc.BezierBy(3, bezier);
Parameters:
{Number} t
time in seconds
{Array} c
Array of points

Field Detail

<static> {cc.BezierBy} cc.BezierBy.create
Please use cc.bezierBy instead. An action that moves the target with a cubic Bezier curve by a certain distance. Relative to its movement.
Deprecated:
since v3.0 please use cc.bezierBy instead.

Method Detail

  • {cc.BezierBy} clone()
    returns a new clone of the action
    Returns:
    {cc.BezierBy}
  • ctor(t, c)
    Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
    Parameters:
    {Number} t
    time in seconds
    {Array} c
    Array of points
  • {Boolean} initWithDuration(t, c)
    Initializes the action.
    Parameters:
    {Number} t
    time in seconds
    {Array} c
    Array of points
    Returns:
    {Boolean}
  • {cc.BezierBy} reverse()
    Returns a reversed action.
    Returns:
    {cc.BezierBy}
  • startWithTarget(target)
    Start the action with target.
    Parameters:
    {cc.Node} target
  • update(dt)
    Called once per frame. Time is the number of seconds of a frame interval.
    Parameters:
    {Number} dt