日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

动作基类 CCAction

發布時間:2023/12/31 编程问答 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 动作基类 CCAction 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

        CCAction動作基類關系

class CC_DLL CCAction : public CCObject { public:CCAction(void);virtual ~CCAction(void);const char* description();virtual CCObject* copyWithZone(CCZone *pZone);//! return true if the action has finishedvirtual bool isDone(void);//! called before the action start. It will also set the target.virtual void startWithTarget(CCNode *pTarget);/** called after the action has finished. It will set the 'target' to nil.IMPORTANT: You should never call "[action stop]" manually. Instead, use: "target->stopAction(action);"*/virtual void stop(void);//! called every frame with it's delta time. DON'T override unless you know what you are doing.virtual void step(float dt);/** called once per frame. time a value between 0 and 1For example: - 0 means that the action just started- 0.5 means that the action is in the middle- 1 means that the action is over*/virtual void update(float time);inline CCNode* getTarget(void) { return m_pTarget; }/** The action will modify the target properties. */inline void setTarget(CCNode *pTarget) { m_pTarget = pTarget; }inline CCNode* getOriginalTarget(void) { return m_pOriginalTarget; } /** Set the original target, since target can be nil.Is the target that were used to run the action. Unless you are doing something complex, like CCActionManager, you should NOT call this method.The target is 'assigned', it is not 'retained'.@since v0.8.2*/inline void setOriginalTarget(CCNode *pOriginalTarget) { m_pOriginalTarget = pOriginalTarget; }inline int getTag(void) { return m_nTag; }inline void setTag(int nTag) { m_nTag = nTag; }public:/** Create an action */static CCAction* create(); protected:CCNode *m_pOriginalTarget;/** The "target".The target will be set with the 'startWithTarget' method.When the 'stop' method is called, target will be set to nil.The target is 'assigned', it is not 'retained'.*/CCNode *m_pTarget;/** The action tag. An identifier of the action */int m_nTag; };

?

?

?

?

?

            即時動作的具體類

?

?

            持續動作類的結構圖

轉載于:https://www.cnblogs.com/MrGreen/p/3269109.html

總結

以上是生活随笔為你收集整理的动作基类 CCAction的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。