cocos2d-x  3.0-alpha0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AnimationFrame Class Reference

AnimationFrame A frame of the animation. More...

#include <CCAnimation.h>

Inheritance diagram for AnimationFrame:
Object Clonable

Public Member Functions

 AnimationFrame ()
virtual ~AnimationFrame ()
bool initWithSpriteFrame (SpriteFrame *spriteFrame, float delayUnits, Dictionary *userInfo)
 initializes the animation frame with a spriteframe, number of delay units and a notification user info More...
 
var initWithSpriteFrame ( var spriteFrame, var delayUnits, var userInfo)
 initializes the animation frame with a spriteframe, number of delay units and a notification user info More...
 
local initWithSpriteFrame ( local spriteFrame, local delayUnits, local userInfo)
 initializes the animation frame with a spriteframe, number of delay units and a notification user info More...
 
SpriteFramegetSpriteFrame () const
void setSpriteFrame (SpriteFrame *frame)
float getDelayUnits () const
 Gets the units of time the frame takes. More...
 
void setDelayUnits (float delayUnits)
 Sets the units of time the frame takes. More...
 
DictionarygetUserInfo () const
 Gets user infomation A AnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo. More...
 
var getUserInfo ()
 Gets user infomation A AnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo. More...
 
local getUserInfo ()
 Gets user infomation A AnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo. More...
 
void setUserInfo (Dictionary *userInfo)
 Sets user infomation. More...
 
virtual AnimationFrameclone () const override
 returns a copy of the object More...
 
local clone ()
 returns a copy of the object More...
 
- Public Member Functions inherited from Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
void release ()
 Release the ownership immediately. More...
 
void retain ()
 Retains the ownership. More...
 
Objectautorelease ()
 Release the ownership sometime soon automatically. More...
 
bool isSingleReference () const
 Returns a boolean value that indicates whether there is only one reference to the object. More...
 
unsigned int retainCount () const
 Returns the object's current reference count. More...
 
virtual bool isEqual (const Object *object)
 Returns a boolean value that indicates whether this object and a given object are equal. More...
 
virtual void acceptVisitor (DataVisitor &visitor)
virtual void update (float dt)
- Public Member Functions inherited from Clonable
virtual ~Clonable ()
CC_DEPRECATED_ATTRIBUTE Objectcopy () const
 returns a copy of the object. More...
 
local copy ()
 returns a copy of the object. More...
 

Protected Attributes

SpriteFrame_spriteFrame
 SpriteFrameName to be used. More...
 
float _delayUnits
 how many units of time the frame takes More...
 
Dictionary_userInfo
 A AnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo. More...
 
- Protected Attributes inherited from Object
unsigned int _reference
 count of references More...
 
var _reference
 count of references More...
 
local _reference
 count of references More...
 
unsigned int _autoReleaseCount
 count of autorelease More...
 
var _autoReleaseCount
 count of autorelease More...
 
local _autoReleaseCount
 count of autorelease More...
 

Additional Inherited Members

- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID More...
 
int _luaID
 Lua reference id. More...
 

Detailed Description

AnimationFrame A frame of the animation.

It contains information like:

  • sprite frame name
  • # of delay units.
  • offset
Since
v2.0

Constructor & Destructor Documentation

var ctor ( )
local AnimationFrame ( )
virtual ~AnimationFrame ( )
virtual

Member Function Documentation

virtual AnimationFrame* clone ( ) const
overridevirtual

returns a copy of the object

Implements Clonable.

var clone ( )
overridevirtual

returns a copy of the object

Implements Clonable.

local clone ( )
overridevirtual

returns a copy of the object

Implements Clonable.

float getDelayUnits ( ) const
inline

Gets the units of time the frame takes.

var getDelayUnits ( )
inline

Gets the units of time the frame takes.

local getDelayUnits ( )
inline

Gets the units of time the frame takes.

SpriteFrame* getSpriteFrame ( ) const
inline
var getSpriteFrame ( )
inline
local getSpriteFrame ( )
inline
Dictionary* getUserInfo ( ) const
inline

Gets user infomation A AnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo.

If UserInfo is nil, then no notification will be broadcast.

var getUserInfo ( )
inline

Gets user infomation A AnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo.

If UserInfo is nil, then no notification will be broadcast.

local getUserInfo ( )
inline

Gets user infomation A AnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo.

If UserInfo is nil, then no notification will be broadcast.

bool initWithSpriteFrame ( SpriteFrame spriteFrame,
float  delayUnits,
Dictionary userInfo 
)

initializes the animation frame with a spriteframe, number of delay units and a notification user info

var initWithSpriteFrame ( var  spriteFrame,
var  delayUnits,
var  userInfo 
)

initializes the animation frame with a spriteframe, number of delay units and a notification user info

local initWithSpriteFrame ( local  spriteFrame,
local  delayUnits,
local  userInfo 
)

initializes the animation frame with a spriteframe, number of delay units and a notification user info

void setDelayUnits ( float  delayUnits)
inline

Sets the units of time the frame takes.

var setDelayUnits ( var  delayUnits)
inline

Sets the units of time the frame takes.

local setDelayUnits ( local  delayUnits)
inline

Sets the units of time the frame takes.

void setSpriteFrame ( SpriteFrame frame)
inline
var setSpriteFrame ( var  frame)
inline
local setSpriteFrame ( local  frame)
inline
void setUserInfo ( Dictionary userInfo)
inline

Sets user infomation.

var setUserInfo ( var  userInfo)
inline

Sets user infomation.

local setUserInfo ( local  userInfo)
inline

Sets user infomation.

Member Data Documentation

float _delayUnits
protected

how many units of time the frame takes

var _delayUnits
protected

how many units of time the frame takes

local _delayUnits
protected

how many units of time the frame takes

SpriteFrame* _spriteFrame
protected

SpriteFrameName to be used.

var _spriteFrame
protected

SpriteFrameName to be used.

local _spriteFrame
protected

SpriteFrameName to be used.

Dictionary* _userInfo
protected

A AnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo.

If UserInfo is nil, then no notification will be broadcast.

var _userInfo
protected

A AnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo.

If UserInfo is nil, then no notification will be broadcast.

local _userInfo
protected

A AnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo.

If UserInfo is nil, then no notification will be broadcast.


The documentation for this class was generated from the following file: