CCActionProgressTimer
#ifndef __ACTION_CCPROGRESS_TIMER_H__
#define __ACTION_CCPROGRESS_TIMER_H__
#include "CCActionInterval.h"
NS_CC_BEGIN
/**
* @addtogroup actions
* @{
*/
/**
@brief Progress to percentage
@since v0.99.1
*/
class CC_DLL CCProgressTo : public CCActionInterval
{
public:
/** Initializes with a duration and a percent */
bool initWithDuration(float duration, float fPercent);
virtual CCObject* copyWithZone(CCZone *pZone);
virtual void startWithTarget(CCNode *pTarget);
virtual void update(float time);
public:
/** Creates and initializes with a duration and a percent */
static CCProgressTo* create(float duration, float fPercent);
protected:
float m_fTo;
float m_fFrom;
};
/**
@brief Progress from a percentage to another percentage
@since v0.99.1
*/
class CC_DLL CCProgressFromTo : public CCActionInterval
{
public:
/** Initializes the action with a duration, a "from" percentage and a "to" percentage */
bool initWithDuration(float duration, float fFromPercentage, float fToPercentage);
virtual CCObject* copyWithZone(CCZone *pZone);
virtual CCActionInterval* reverse(void);
virtual void startWithTarget(CCNode *pTarget);
virtual void update(float time);
public:
/** Creates and initializes the action with a duration, a "from" percentage and a "to" percentage */
static CCProgressFromTo* create(float duration, float fFromPercentage, float fToPercentage);
protected:
float m_fTo;
float m_fFrom;
};
// end of actions group
/// @}
NS_CC_END
#endif // __ACTION_CCPROGRESS_TIMER_H__
浙公网安备 33010602011771号