A frame of the animation.
More...
#include <Animation.h>
Inherits Object, and Clonable.
|
SpriteFrame * | getSpriteFrame () const |
| Return a SpriteFrameName to be used.
|
|
void | setSpriteFrame (SpriteFrame *frame) |
| Set the SpriteFrame.
|
|
float | getDelayUnits () const |
| Gets the units of time the frame takes.
|
|
void | setDelayUnits (float delayUnits) |
| Sets the units of time the frame takes.
|
|
const ValueMap & | getUserInfo () const |
| Gets user information A AnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo.
|
|
void | setUserInfo (const ValueMap &userInfo) |
| Sets user information.
|
|
virtual AnimationFrame * | clone () const override |
| Returns a copy of the Object.
|
|
| AnimationFrame () |
| @js ctor
|
|
virtual | ~AnimationFrame () |
| @js NA @lua NA
|
|
bool | initWithSpriteFrame (SpriteFrame *spriteFrame, float delayUnits, const ValueMap &userInfo) |
| initializes the animation frame with a spriteframe, number of delay units and a notification user info
|
|
void | retain () |
| Retains the ownership.
|
|
void | release () |
| Releases the ownership immediately.
|
|
Object * | autorelease () |
| Releases the ownership sometime soon automatically.
|
|
unsigned int | getReferenceCount () const |
| Returns the Object's current reference count.
|
|
virtual | ~Object () |
| Destructor.
|
|
virtual | ~Clonable () |
| @js NA @lua NA
|
|
|
static AnimationFrame * | create (SpriteFrame *spriteFrame, float delayUnits, const ValueMap &userInfo) |
| Creates the animation frame with a spriteframe, number of delay units and a notification user info.
|
|
|
unsigned int | _ID |
| object id, ScriptSupport need public _ID
|
|
int | _luaID |
| Lua reference id.
|
|
A frame of the animation.
It contains information like:
- sprite frame name.
- # of delay units.
- offset
- Since
- v2.0
◆ create()
Creates the animation frame with a spriteframe, number of delay units and a notification user info.
- Parameters
-
spriteFrame | The animation frame with a spriteframe. |
delayUnits | Number of delay units. |
userInfo | A notification user info. |
- Since
- 3.0
◆ getSpriteFrame()
Return a SpriteFrameName to be used.
- Returns
- a SpriteFrameName to be used.
◆ setSpriteFrame()
◆ getDelayUnits()
float getDelayUnits |
( |
| ) |
const |
|
inline |
Gets the units of time the frame takes.
- Returns
- The units of time the frame takes.
◆ setDelayUnits()
void setDelayUnits |
( |
float | delayUnits | ) |
|
|
inline |
Sets the units of time the frame takes.
- Parameters
-
delayUnits | The units of time the frame takes. |
◆ getUserInfo()
const ValueMap & getUserInfo |
( |
| ) |
const |
|
inline |
Gets user information 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.
- Returns
- A dictionary as UserInfo
◆ setUserInfo()
void setUserInfo |
( |
const ValueMap & | userInfo | ) |
|
|
inline |
Sets user information.
- Parameters
-
userInfo | A dictionary as UserInfo. |
The documentation for this class was generated from the following file: