Class cc.GridAction

Class Summary
Constructor Attributes Constructor Name and Description
 
cc.GridAction(duration, gridSize)
Base class for Grid actions

Method Summary

Class Detail

cc.GridAction(duration, gridSize)
Base class for Grid actions
Parameters:
{Number} duration
{cc.Size} gridSize

Field Detail

<static> {cc.GridAction} cc.GridAction.create
Please use cc.gridAction instead.
Creates the action with size and duration.
Deprecated:
since v3.0
Please use cc.gridAction instead.

Method Detail

  • {cc.Action} clone()
    to copy object with deep copy. returns a clone of action.
    Returns:
    {cc.Action}
  • ctor(duration, gridSize)
    Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
    Parameters:
    {Number} duration
    {cc.Size} gridSize
  • {cc.GridBase} getGrid()
    Returns the grid.
    Returns:
    {cc.GridBase}
  • {Boolean} initWithDuration(duration, gridSize)
    Initializes the action with size and duration.
    Parameters:
    {Number} duration
    {cc.Size} gridSize
    Returns:
    {Boolean}
  • {cc.ReverseTime} reverse()
    Create a cc.ReverseTime action. Opposite with the original motion trajectory.
    Returns:
    {cc.ReverseTime}
  • startWithTarget(target)
    called before the action start. It will also set the target.
    Parameters:
    {cc.Node} target