Class cc.AnimationFrame

Class Summary
Constructor Attributes Constructor Name and Description
 

cc.AnimationFrame A frame of the animation.

Method Summary

Class Detail

cc.AnimationFrame()

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

Method Detail

  • {Number} getDelayUnits()
    how many units of time the frame takes getter
    Returns:
    {Number}
  • {cc.SpriteFrame} getSpriteFrame()
    cc.SpriteFrameName to be used
    Returns:
    {cc.SpriteFrame}
  • {object} getUserInfo()

    A cc.AnimationFrameDisplayedNotification notification will be broadcasted when the frame is displayed with this dictionary as UserInfo.
    If UserInfo is nil, then no notification will be broadcasted.

    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)
    how many units of time the frame takes setter
    Parameters:
    delayUnits
  • setSpriteFrame(spriteFrame)
    cc.SpriteFrameName to be used
    Parameters:
    {cc.SpriteFrame} spriteFrame
  • setUserInfo(userInfo)
    Parameters:
    {object} userInfo