Class cc.AnimationFrame

Class Summary
Constructor Attributes Constructor Name and Description
 
cc.AnimationFrame(spriteFrame, delayUnits, userInfo)

cc.AnimationFrame A frame of the animation.

Method Summary

Class Detail

cc.AnimationFrame(spriteFrame, delayUnits, userInfo)

cc.AnimationFrame A frame of the animation. It contains information like: - sprite frame name - # of delay units. - offset

Parameters:
spriteFrame
delayUnits
userInfo
Returns:
{AnimationFrame}

Method Detail

  • {AnimationFrame} clone()
    Create a new animation frame and copy all contents into it
    Returns:
    {AnimationFrame}
  • {AnimationFrame} copy(pZone)
    Create a new animation frame and copy all contents into it
    Parameters:
    pZone
    Returns:
    {AnimationFrame}
  • {AnimationFrame} copyWithZone(pZone)
    Create a new animation frame and copy all contents into it
    Parameters:
    pZone
    Returns:
    {AnimationFrame}
  • <static> cc.AnimationFrame.create(spriteFrame, delayUnits, userInfo)
    Creates an animation frame.
    Parameters:
    {cc.SpriteFrame} spriteFrame
    {Number} delayUnits
    {object} userInfo
    Deprecated:
    since v3.0, please use the new construction instead
    See:
    cc.AnimationFrame
  • {Number} getDelayUnits()
    Returns how many units of time the frame takes getter
    Returns:
    {Number}
  • {cc.SpriteFrame} getSpriteFrame()
    Returns sprite frame to be used
    Returns:
    {cc.SpriteFrame}
  • {object} getUserInfo()
    Returns the user custom information
    Returns:
    {object}
  • initWithSpriteFrame(spriteFrame, delayUnits, userInfo)
    initializes the animation frame with a spriteframe, number of delay units and a notification user info
    Parameters:
    {cc.SpriteFrame} spriteFrame
    {Number} delayUnits
    {object} userInfo
  • setDelayUnits(delayUnits)
    Sets how many units of time the frame takes setter
    Parameters:
    delayUnits
  • setSpriteFrame(spriteFrame)
    Sets sprite frame to be used
    Parameters:
    {cc.SpriteFrame} spriteFrame
  • setUserInfo(userInfo)
    Sets the user custom information
    Parameters:
    {object} userInfo