Class ccs.ActionObject

Class Summary
Constructor Attributes Constructor Name and Description
 
The Cocostudio's action object.

Method Summary

Class Detail

ccs.ActionObject()
The Cocostudio's action object.

Method Detail

  • addActionNode(node)
    Adds a ActionNode to play the action.
    Parameters:
    {ccs.ActionNode} node
  • ctor()
    Construction of ccs.ActionObject.
  • {number} getCurrentTime()
    Returns the current time of frame.
    Returns:
    {number}
  • {boolean} getLoop()
    Returns if the action will loop play.
    Returns:
    {boolean}
  • {string} getName()
    Returns name fo ccs.ActionObject
    Returns:
    {string}
  • {number} getTotalTime()
    Returns the total time of frame.
    Returns:
    {number} the total time of frame
  • {number} getUnitTime()
    Returns the time interval of frame.
    Returns:
    {number} the time interval of frame
  • initWithDictionary(dic, root)
    Init properties with a json dictionary
    Parameters:
    {Object} dic
    {Object} root
  • {boolean} isPlaying()
    Returns if the action is playing.
    Returns:
    {boolean} true if the action is playing, false the otherwise
  • pause()
    Pauses the action.
  • play(fun)
    Plays the action.
    Parameters:
    {cc.CallFunc} fun Optional
    Action Call Back
  • removeActionNode(node)
    Removes a ActionNode which play the action.
    Parameters:
    {ccs.ActionNode} node
  • setCurrentTime(time)
    Sets the current time of frame.
    Parameters:
    {Number} time
    the current time of frame
  • setLoop(loop)
    Sets if the action will loop play.
    Parameters:
    {boolean} loop
  • setName(name)
    Sets name to ccs.ActionObject
    Parameters:
    {string} name
  • setUnitTime(time)
    Sets the time interval of frame.
    Parameters:
    {number} time
  • simulationActionUpdate(dt)
    scheduler update function
    Parameters:
    {Number} dt
    delta time
  • stop()
    Stop the action.
  • updateToFrameByTime(time)
    Updates frame by time.
    Parameters:
    time