cocos2d - x 노드 (CCActionProgressTimer. h) API

본문http://blog.csdn.net/runaying ,인용 은 출처 를 밝 혀 야 합 니 다!
cocos2d - x 노드 (CCActionProgressTimer. h) API
따뜻 한 알림: 여러분 이 더 잘 공부 할 수 있 도록 본인 의 블 로 그 를 보 는 것 을 강력 추천 합 니 다. Cocos2d - X 권위 있 는 안내서 노트
/ / 진도 표시 줄
///cocos2d-x-3.0alpha0/cocos2dx/actions
//   

#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 ProgressTo : public ActionInterval
{
public:
    /**    duration 、 percent        */
    static ProgressTo* create(float duration, float fPercent);

    /**    duration 、 percent     */
    bool initWithDuration(float duration, float fPercent);

    //
    // Overrides
    //
	virtual ProgressTo* clone() const override;
	virtual ProgressTo* reverse(void) const override;
    virtual void startWithTarget(Node *target) override;
    virtual void update(float time) override;

protected:
    float _to;
    float _from;
};

/**
@brief            (   )
@since v0.99.1
*/
class CC_DLL ProgressFromTo : public ActionInterval
{
public:
    /** Creates and initializes the action with a duration, a "from" percentage and a "to" percentage */
    static ProgressFromTo* create(float duration, float fFromPercentage, float fToPercentage);

    /** Initializes the action with a duration, a "from" percentage and a "to" percentage */
    bool initWithDuration(float duration, float fFromPercentage, float fToPercentage);

    //
    // Overrides
    //
	virtual ProgressFromTo* clone() const override;
	virtual ProgressFromTo* reverse(void) const override;
    virtual void startWithTarget(Node *target) override;
    virtual void update(float time) override;

protected:
    float _to;
    float _from;
};

// end of actions group
/// @}

NS_CC_END

#endif // __ACTION_CCPROGRESS_TIMER_H__

좋은 웹페이지 즐겨찾기