Class ccs.ProcessBase

Class Summary
Constructor Attributes Constructor Name and Description
 
The Base Process class for Cocostudio.

Method Summary

Class Detail

ccs.ProcessBase()
The Base Process class for Cocostudio.

Field Detail

{Number} animationInterval
- The animation internal
{Boolean} completed
- <@readonly> Indicate whether the process is done
{Number} currentFrameIndex
- <@readonly> The current frame's index
{Number} currentPercent
- <@readonly> The current percentage of the process
{Number} loop
- <@readonly> The number of loop
{Boolean} paused
- <@readonly> Indicate whether the process is paused
{Boolean} playing
- <@readonly> Indicate whether the process is playing
{Number} processScale
- The process scale
{Number} rawDuration
- <@readonly> The duration
{Number} tweenEasing
- <@readonly> The tween easing

Method Detail

  • ctor()
    Constructor of ccs.ProcessBase
  • {number} getAnimationInternal()
    Returns animation interval of ccs.ProcessBase
    Returns:
    {number}
  • {Number} getCurrentFrameIndex()
    Returns the index of current frame.
    Returns:
    {Number}
  • {number} getCurrentPercent()
    Returns current percent of ccs.ProcessBase
    Returns:
    {number}
  • {number} getLoop()
    Returns loop type of ccs.ProcessBase
    Returns:
    {number}
  • {number} getProcessScale()
    Returns process scale
    Returns:
    {number}
  • {number} getRawDuration()
    Returns the raw duration of ccs.ProcessBase
    Returns:
    {number}
  • {number} getTweenEasing()
    Returns tween easing of ccs.ProcessBase
    Returns:
    {number}
  • gotoFrame(frameIndex)
    Goes to specified frame by frameIndex.
    Parameters:
    {Number} frameIndex
  • {boolean} isComplete()
    Returns whether the animation is complete
    Returns:
    {boolean}
  • {boolean} isPause()
    Returns whether the animation is pause
    Returns:
    {boolean}
  • {boolean} isPlaying()
    Returns whether the animation is playing
    Returns:
    {boolean}
  • pause()
    Pauses the Process
  • play(durationTo, durationTween, loop, tweenEasing)
    Plays animation by animation name.
    Parameters:
    {Number} durationTo
    The frames between two animation changing-over. It's meaning is changing to this animation need how many frames -1 : use the value from MovementData get from flash design panel
    {Number} durationTween
    The frame count you want to play in the game. if _durationTween is 80, then the animation will played 80 frames in a loop -1 : use the value from MovementData get from flash design panel
    {Number} loop
    Whether the animation is loop loop < 0 : use the value from MovementData get from flash design panel loop = 0 : this animation is not loop loop > 0 : this animation is loop
    {Number} tweenEasing
    Tween easing is used for calculate easing effect TWEEN_EASING_MAX : use the value from MovementData get from flash design panel -1 : fade out 0 : line 1 : fade in 2 : fade in and out
  • resume()
    Resumes the Process
  • setAnimationInternal(animationInternal)
    Sets animation interval to ccs.ProcessBase.
    Parameters:
    animationInternal
  • setProcessScale(processScale)
    Sets process scale
    Parameters:
    processScale
  • stop()
    Stops the Process
  • update(dt)
    Update process' state.
    Parameters:
    {Number} dt
  • updateHandler()
    Updates will call this handler, you can handle your logic here