Class ccs.ActionNode

Class Summary
Constructor Attributes Constructor Name and Description
 
The Cocostudio's action node, it contains action target, action frame list and current frame index.

Method Summary

Class Detail

ccs.ActionNode()
The Cocostudio's action node, it contains action target, action frame list and current frame index. it can be play action by calling playAciton.

Method Detail

  • addFrame(frame)
    Pushes back an ActionFrame to ccs.ActionNode.
    Parameters:
    {ccs.ActionFrame} frame
  • clearAllFrame()
    Removes all ActionFrames from ccs.ActionNode.
  • ctor()
    Construction of ccs.ActionNode
  • deleteFrame(frame)
    Removes an ActionFrame from ccs.ActionNode.
    Parameters:
    {ccs.ActionFrame} frame
  • {cc.Node} getActionNode()
    Returns the target node of ccs.ActionNode
    Returns:
    {cc.Node}
  • {number} getActionTag()
    Returns the tag of ccs.ActionNode
    Returns:
    {number}
  • {number} getFirstFrameIndex()
    Returns index of first ActionFrame.
    Returns:
    {number}
  • {number} getLastFrameIndex()
    Returns the index of last ccs.ActionFrame.
    Returns:
    {number}
  • {*} getObject()
    Returns node which will run a action.
    Returns:
    {*}
  • {number} getUnitTime()
    Returns the time interval of frame.
    Returns:
    {number}
  • initWithDictionary(dic, root)
    Init properties with a json dictionary
    Parameters:
    {Object} dic
    {Object} root
  • insertFrame(index, frame)
    Inserts an ActionFrame to ccs.ActionNode.
    Parameters:
    {number} index
    {ccs.ActionFrame} frame
  • {Boolean} isActionDoneOnce()
    Returns if the action is done once time.
    Returns:
    {Boolean} that if the action is done once time
  • playAction(fun)
    Plays ccs.ActionNode's action.
    Parameters:
    {cc.CallFunc} fun
  • setActionTag(tag)
    Sets tag to ccs.ActionNode
    Parameters:
    {Number} tag
  • setObject(node)
    Sets node which will run a action.
    Parameters:
    {Object} node
  • setUnitTime(time)
    Sets the time interval of frame.
    Parameters:
    {number} time
  • stopAction()
    Stops action.
  • {boolean} updateActionToTimeLine(time)
    Updates action states to some time.
    Parameters:
    {Number} time
    Returns:
    {boolean}