mirror of https://github.com/axmolengine/axmol.git
Delete 'cocos2d::' since extension is the sub-namespace of cocos2d.
This commit is contained in:
parent
426915dd4a
commit
a413496a1a
|
@ -15,15 +15,15 @@ public:
|
||||||
virtual void completedAnimationSequenceNamed(const char *name) = 0;
|
virtual void completedAnimationSequenceNamed(const char *name) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CCBAnimationManager : public cocos2d::CCObject
|
class CCBAnimationManager : public CCObject
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
cocos2d::CCArray *mSequences;
|
CCArray *mSequences;
|
||||||
cocos2d::CCDictionary *mNodeSequences;
|
CCDictionary *mNodeSequences;
|
||||||
cocos2d::CCDictionary *mBaseValues;
|
CCDictionary *mBaseValues;
|
||||||
int mAutoPlaySequenceId;
|
int mAutoPlaySequenceId;
|
||||||
|
|
||||||
cocos2d::CCNode *mRootNode;
|
CCNode *mRootNode;
|
||||||
CCSize mRootContainerSize;
|
CCSize mRootContainerSize;
|
||||||
|
|
||||||
CCBAnimationManagerDelegate *mDelegate;
|
CCBAnimationManagerDelegate *mDelegate;
|
||||||
|
@ -35,26 +35,26 @@ public:
|
||||||
|
|
||||||
virtual bool init();
|
virtual bool init();
|
||||||
|
|
||||||
cocos2d::CCArray* getSequences();
|
CCArray* getSequences();
|
||||||
|
|
||||||
int getAutoPlaySequenceId();
|
int getAutoPlaySequenceId();
|
||||||
void setAutoPlaySequenceId(int autoPlaySequenceId);
|
void setAutoPlaySequenceId(int autoPlaySequenceId);
|
||||||
|
|
||||||
cocos2d::CCNode* getRootNode();
|
CCNode* getRootNode();
|
||||||
void setRootNode(cocos2d::CCNode* pRootNode); // retain
|
void setRootNode(CCNode* pRootNode); // retain
|
||||||
|
|
||||||
const cocos2d::CCSize& getRootContainerSize();
|
const CCSize& getRootContainerSize();
|
||||||
void setRootContainerSize(const cocos2d::CCSize &rootContainerSize);
|
void setRootContainerSize(const CCSize &rootContainerSize);
|
||||||
|
|
||||||
CCBAnimationManagerDelegate* getDelegate();
|
CCBAnimationManagerDelegate* getDelegate();
|
||||||
void setDelegate(CCBAnimationManagerDelegate* pDelegate); // retain
|
void setDelegate(CCBAnimationManagerDelegate* pDelegate); // retain
|
||||||
|
|
||||||
const char* getRunningSequenceName();
|
const char* getRunningSequenceName();
|
||||||
|
|
||||||
const CCSize& getContainerSize(cocos2d::CCNode* pNode);
|
const CCSize& getContainerSize(CCNode* pNode);
|
||||||
|
|
||||||
void addNode(cocos2d::CCNode *pNode, cocos2d::CCDictionary *pSeq);
|
void addNode(CCNode *pNode, CCDictionary *pSeq);
|
||||||
void setBaseValue(cocos2d::CCObject *pValue, cocos2d::CCNode *pNode, const char *pPropName);
|
void setBaseValue(CCObject *pValue, CCNode *pNode, const char *pPropName);
|
||||||
|
|
||||||
void runAnimations(const char *pName, float fTweenDuration);
|
void runAnimations(const char *pName, float fTweenDuration);
|
||||||
void runAnimations(const char *pName);
|
void runAnimations(const char *pName);
|
||||||
|
@ -63,33 +63,33 @@ public:
|
||||||
void debug();
|
void debug();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cocos2d::CCObject* getBaseValue(cocos2d::CCNode *pNode, const char* pPropName);
|
CCObject* getBaseValue(CCNode *pNode, const char* pPropName);
|
||||||
int getSequenceId(const char* pSequenceName);
|
int getSequenceId(const char* pSequenceName);
|
||||||
CCBSequence* getSequence(int nSequenceId);
|
CCBSequence* getSequence(int nSequenceId);
|
||||||
cocos2d::CCActionInterval* getAction(CCBKeyframe *pKeyframe0, CCBKeyframe *pKeyframe1, const char *pPropName, cocos2d::CCNode *pNode);
|
CCActionInterval* getAction(CCBKeyframe *pKeyframe0, CCBKeyframe *pKeyframe1, const char *pPropName, CCNode *pNode);
|
||||||
void setAnimatedProperty(const char *pPropName, cocos2d::CCNode *pNode, cocos2d::CCObject *pValue, float fTweenDuraion);
|
void setAnimatedProperty(const char *pPropName, CCNode *pNode, CCObject *pValue, float fTweenDuraion);
|
||||||
void setFirstFrame(cocos2d::CCNode *pNode, CCBSequenceProperty *pSeqProp, float fTweenDuration);
|
void setFirstFrame(CCNode *pNode, CCBSequenceProperty *pSeqProp, float fTweenDuration);
|
||||||
cocos2d::CCActionInterval* getEaseAction(cocos2d::CCActionInterval *pAction, int nEasingType, float fEasingOpt);
|
CCActionInterval* getEaseAction(CCActionInterval *pAction, int nEasingType, float fEasingOpt);
|
||||||
void runAction(cocos2d::CCNode *pNode, CCBSequenceProperty *pSeqProp, float fTweenDuration);
|
void runAction(CCNode *pNode, CCBSequenceProperty *pSeqProp, float fTweenDuration);
|
||||||
void sequenceCompleted();
|
void sequenceCompleted();
|
||||||
};
|
};
|
||||||
|
|
||||||
class CCBSetSpriteFrame : public cocos2d::CCActionInstant
|
class CCBSetSpriteFrame : public CCActionInstant
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
cocos2d::CCSpriteFrame *mSpriteFrame;
|
CCSpriteFrame *mSpriteFrame;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
~CCBSetSpriteFrame();
|
~CCBSetSpriteFrame();
|
||||||
|
|
||||||
/** creates a Place action with a position */
|
/** creates a Place action with a position */
|
||||||
static CCBSetSpriteFrame* create(cocos2d::CCSpriteFrame *pSpriteFrame);
|
static CCBSetSpriteFrame* create(CCSpriteFrame *pSpriteFrame);
|
||||||
bool initWithSpriteFrame(cocos2d::CCSpriteFrame *pSpriteFrame);
|
bool initWithSpriteFrame(CCSpriteFrame *pSpriteFrame);
|
||||||
virtual void update(float time);
|
virtual void update(float time);
|
||||||
virtual cocos2d::CCObject* copyWithZone(cocos2d::CCZone *pZone);
|
virtual CCObject* copyWithZone(CCZone *pZone);
|
||||||
};
|
};
|
||||||
|
|
||||||
class CCBRotateTo : public cocos2d::CCActionInterval
|
class CCBRotateTo : public CCActionInterval
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
float mStartAngle;
|
float mStartAngle;
|
||||||
|
@ -100,8 +100,8 @@ public:
|
||||||
static CCBRotateTo* create(float fDuration, float fAngle);
|
static CCBRotateTo* create(float fDuration, float fAngle);
|
||||||
bool initWithDuration(float fDuration, float fAngle);
|
bool initWithDuration(float fDuration, float fAngle);
|
||||||
virtual void update(float time);
|
virtual void update(float time);
|
||||||
virtual cocos2d::CCObject* copyWithZone(cocos2d::CCZone *pZone);
|
virtual CCObject* copyWithZone(CCZone *pZone);
|
||||||
virtual void startWithTarget(cocos2d::CCNode *pNode);
|
virtual void startWithTarget(CCNode *pNode);
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_CC_EXT_END
|
NS_CC_EXT_END
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
|
|
||||||
NS_CC_EXT_BEGIN
|
NS_CC_EXT_BEGIN
|
||||||
|
|
||||||
class CCBKeyframe : public cocos2d::CCObject
|
class CCBKeyframe : public CCObject
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
cocos2d::CCObject *mValue;
|
CCObject *mValue;
|
||||||
float mTime;
|
float mTime;
|
||||||
int mEasingType;
|
int mEasingType;
|
||||||
float mEasingOpt;
|
float mEasingOpt;
|
||||||
|
@ -18,8 +18,8 @@ public:
|
||||||
CCBKeyframe();
|
CCBKeyframe();
|
||||||
~CCBKeyframe();
|
~CCBKeyframe();
|
||||||
|
|
||||||
cocos2d::CCObject* getValue();
|
CCObject* getValue();
|
||||||
void setValue(cocos2d::CCObject *pValue); // retain
|
void setValue(CCObject *pValue); // retain
|
||||||
|
|
||||||
float getTime();
|
float getTime();
|
||||||
void setTime(float fTime);
|
void setTime(float fTime);
|
||||||
|
|
|
@ -21,7 +21,7 @@ class CCBMemberVariableAssigner {
|
||||||
public:
|
public:
|
||||||
virtual ~CCBMemberVariableAssigner() {};
|
virtual ~CCBMemberVariableAssigner() {};
|
||||||
|
|
||||||
virtual bool onAssignCCBMemberVariable(CCObject * pTarget, cocos2d::CCString * pMemberVariableName, CCNode * pNode) = 0;
|
virtual bool onAssignCCBMemberVariable(CCObject * pTarget, CCString * pMemberVariableName, CCNode * pNode) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_CC_EXT_END
|
NS_CC_EXT_END
|
||||||
|
|
|
@ -19,9 +19,9 @@ NS_CC_EXT_BEGIN
|
||||||
class CCBSelectorResolver {
|
class CCBSelectorResolver {
|
||||||
public:
|
public:
|
||||||
virtual ~CCBSelectorResolver() {};
|
virtual ~CCBSelectorResolver() {};
|
||||||
virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuItemSelector(CCObject * pTarget, CCString * pSelectorName) = 0;
|
virtual SEL_MenuHandler onResolveCCBCCMenuItemSelector(CCObject * pTarget, CCString * pSelectorName) = 0;
|
||||||
|
|
||||||
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, CCString * pSelectorName) = 0;
|
virtual extension::SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, CCString * pSelectorName) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
NS_CC_EXT_BEGIN
|
NS_CC_EXT_BEGIN
|
||||||
|
|
||||||
class CCBSequence : public cocos2d::CCObject
|
class CCBSequence : public CCObject
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
float mDuration;
|
float mDuration;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
NS_CC_EXT_BEGIN
|
NS_CC_EXT_BEGIN
|
||||||
|
|
||||||
class CCBSequenceProperty : public cocos2d::CCObject
|
class CCBSequenceProperty : public CCObject
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::string mName;
|
std::string mName;
|
||||||
|
|
|
@ -6,7 +6,7 @@ NS_CC_EXT_BEGIN
|
||||||
|
|
||||||
// Implementation of ccColor3BWapper
|
// Implementation of ccColor3BWapper
|
||||||
|
|
||||||
ccColor3BWapper* ccColor3BWapper::create(const cocos2d::ccColor3B& color)
|
ccColor3BWapper* ccColor3BWapper::create(const ccColor3B& color)
|
||||||
{
|
{
|
||||||
ccColor3BWapper *ret = new ccColor3BWapper();
|
ccColor3BWapper *ret = new ccColor3BWapper();
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
|
@ -10,15 +10,15 @@
|
||||||
|
|
||||||
NS_CC_EXT_BEGIN
|
NS_CC_EXT_BEGIN
|
||||||
|
|
||||||
class ccColor3BWapper : public cocos2d::CCObject
|
class ccColor3BWapper : public CCObject
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
cocos2d::ccColor3B color;
|
ccColor3B color;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static ccColor3BWapper* create(const cocos2d::ccColor3B& color);
|
static ccColor3BWapper* create(const ccColor3B& color);
|
||||||
|
|
||||||
const cocos2d::ccColor3B& getColor();
|
const ccColor3B& getColor();
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -30,7 +30,7 @@ enum
|
||||||
kUnsignedCharValue,
|
kUnsignedCharValue,
|
||||||
};
|
};
|
||||||
|
|
||||||
class CCBValue : public cocos2d::CCObject
|
class CCBValue : public CCObject
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
union
|
union
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
NS_CC_EXT_BEGIN
|
NS_CC_EXT_BEGIN
|
||||||
|
|
||||||
class CCData : public cocos2d::CCObject
|
class CCData : public CCObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CCData(unsigned char *pBytes, const unsigned long nSize);
|
CCData(unsigned char *pBytes, const unsigned long nSize);
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
|
|
||||||
NS_CC_EXT_BEGIN
|
NS_CC_EXT_BEGIN
|
||||||
|
|
||||||
extern cocos2d::CCPoint getAbsolutePosition(const cocos2d::CCPoint &pt, int nType, const cocos2d::CCSize &containerSize, const char *pPropName);
|
extern CCPoint getAbsolutePosition(const CCPoint &pt, int nType, const CCSize &containerSize, const char *pPropName);
|
||||||
|
|
||||||
extern void setRelativeScale(cocos2d::CCNode *pNode, float fScaleX, float fScaleY, int nType, const char* pPropName);
|
extern void setRelativeScale(CCNode *pNode, float fScaleX, float fScaleY, int nType, const char* pPropName);
|
||||||
|
|
||||||
NS_CC_EXT_END
|
NS_CC_EXT_END
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,11 @@ NS_CC_EXT_BEGIN
|
||||||
#define ASSERT_FAIL_UNEXPECTED_PROPERTY(PROPERTY) CCLog("Unexpected property: '%s'!\n", PROPERTY->getCString()); assert(false)
|
#define ASSERT_FAIL_UNEXPECTED_PROPERTY(PROPERTY) CCLog("Unexpected property: '%s'!\n", PROPERTY->getCString()); assert(false)
|
||||||
#define ASSERT_FAIL_UNEXPECTED_PROPERTYTYPE(PROPERTYTYPE) CCLog("Unexpected property type: '%d'!\n", PROPERTYTYPE); assert(false)
|
#define ASSERT_FAIL_UNEXPECTED_PROPERTYTYPE(PROPERTYTYPE) CCLog("Unexpected property type: '%d'!\n", PROPERTYTYPE); assert(false)
|
||||||
|
|
||||||
#define CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(T) virtual T * createCCNode(cocos2d::CCNode * pParent, cocos2d::extension::CCBReader * pCCBReader) { \
|
#define CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(T) virtual T * createCCNode(CCNode * pParent, extension::CCBReader * pCCBReader) { \
|
||||||
return T::create(); \
|
return T::create(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CCB_PURE_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(T) virtual T * createCCNode(cocos2d::CCNode * pParent, cocos2d::extension::CCBReader * pCCBReader) = 0
|
#define CCB_PURE_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(T) virtual T * createCCNode(CCNode * pParent, extension::CCBReader * pCCBReader) = 0
|
||||||
|
|
||||||
struct BlockData {
|
struct BlockData {
|
||||||
SEL_MenuHandler mSELMenuHandler;
|
SEL_MenuHandler mSELMenuHandler;
|
||||||
|
|
|
@ -19,20 +19,20 @@ NS_CC_EXT_BEGIN
|
||||||
|
|
||||||
typedef unsigned int CCControlEvent;
|
typedef unsigned int CCControlEvent;
|
||||||
|
|
||||||
typedef void (cocos2d::CCObject::*SEL_CCControlHandler)(cocos2d::CCObject*, CCControlEvent);
|
typedef void (CCObject::*SEL_CCControlHandler)(CCObject*, CCControlEvent);
|
||||||
|
|
||||||
#define cccontrol_selector(_SELECTOR) (SEL_CCControlHandler)(&_SELECTOR)
|
#define cccontrol_selector(_SELECTOR) (SEL_CCControlHandler)(&_SELECTOR)
|
||||||
|
|
||||||
class CCInvocation : public cocos2d::CCObject
|
class CCInvocation : public CCObject
|
||||||
{
|
{
|
||||||
CC_SYNTHESIZE_READONLY(SEL_CCControlHandler, m_action, Action);
|
CC_SYNTHESIZE_READONLY(SEL_CCControlHandler, m_action, Action);
|
||||||
CC_SYNTHESIZE_READONLY(CCObject*, m_target, Target);
|
CC_SYNTHESIZE_READONLY(CCObject*, m_target, Target);
|
||||||
CC_SYNTHESIZE_READONLY(CCControlEvent, m_controlEvent, ControlEvent);
|
CC_SYNTHESIZE_READONLY(CCControlEvent, m_controlEvent, ControlEvent);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CCInvocation(cocos2d::CCObject* target, SEL_CCControlHandler action, CCControlEvent controlEvent);
|
CCInvocation(CCObject* target, SEL_CCControlHandler action, CCControlEvent controlEvent);
|
||||||
|
|
||||||
void invoke(cocos2d::CCObject* sender);
|
void invoke(CCObject* sender);
|
||||||
};
|
};
|
||||||
|
|
||||||
// end of GUI group
|
// end of GUI group
|
||||||
|
|
|
@ -43,7 +43,7 @@ NS_CC_EXT_BEGIN
|
||||||
/** @brief Singleton that handles asynchrounous http requests
|
/** @brief Singleton that handles asynchrounous http requests
|
||||||
* Once the request completed, a callback will issued in main thread when it provided during make request
|
* Once the request completed, a callback will issued in main thread when it provided during make request
|
||||||
*/
|
*/
|
||||||
class CCHttpClient : public cocos2d::CCObject
|
class CCHttpClient : public CCObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** Return the shared instance **/
|
/** Return the shared instance **/
|
||||||
|
|
|
@ -35,7 +35,7 @@ NS_CC_EXT_BEGIN
|
||||||
Please refer to samples/TestCpp/Classes/ExtensionTest/NetworkTest/HttpClientTest.cpp as a sample
|
Please refer to samples/TestCpp/Classes/ExtensionTest/NetworkTest/HttpClientTest.cpp as a sample
|
||||||
@since v2.0.2
|
@since v2.0.2
|
||||||
*/
|
*/
|
||||||
class CCHttpRequest : public cocos2d::CCObject
|
class CCHttpRequest : public CCObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** Use this enum type as param in setReqeustType(param) */
|
/** Use this enum type as param in setReqeustType(param) */
|
||||||
|
@ -155,7 +155,7 @@ public:
|
||||||
|
|
||||||
/** Required field. You should set the callback selector function at ack the http request completed
|
/** Required field. You should set the callback selector function at ack the http request completed
|
||||||
*/
|
*/
|
||||||
inline void setResponseCallback(cocos2d::CCObject* pTarget, cocos2d::SEL_CallFuncND pSelector)
|
inline void setResponseCallback(CCObject* pTarget, SEL_CallFuncND pSelector)
|
||||||
{
|
{
|
||||||
_pTarget = pTarget;
|
_pTarget = pTarget;
|
||||||
_pSelector = pSelector;
|
_pSelector = pSelector;
|
||||||
|
@ -171,7 +171,7 @@ public:
|
||||||
return _pTarget;
|
return _pTarget;
|
||||||
}
|
}
|
||||||
/** Get the selector function pointer, mainly used by CCHttpClient */
|
/** Get the selector function pointer, mainly used by CCHttpClient */
|
||||||
inline cocos2d::SEL_CallFuncND getSelector()
|
inline SEL_CallFuncND getSelector()
|
||||||
{
|
{
|
||||||
return _pSelector;
|
return _pSelector;
|
||||||
}
|
}
|
||||||
|
@ -182,8 +182,8 @@ protected:
|
||||||
std::string _url; /// target url that this request is sent to
|
std::string _url; /// target url that this request is sent to
|
||||||
std::vector<char> _requestData; /// used for POST
|
std::vector<char> _requestData; /// used for POST
|
||||||
std::string _tag; /// user defined tag, to identify different requests in response callback
|
std::string _tag; /// user defined tag, to identify different requests in response callback
|
||||||
cocos2d::CCObject* _pTarget; /// callback target of pSelector function
|
CCObject* _pTarget; /// callback target of pSelector function
|
||||||
cocos2d::SEL_CallFuncND _pSelector; /// callback function, e.g. MyLayer::onHttpResponse(CCObject *sender, void *data)
|
SEL_CallFuncND _pSelector; /// callback function, e.g. MyLayer::onHttpResponse(CCObject *sender, void *data)
|
||||||
void* _pUserData; /// You can add your customed data here
|
void* _pUserData; /// You can add your customed data here
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ NS_CC_EXT_BEGIN
|
||||||
Please refer to samples/TestCpp/Classes/ExtensionTest/NetworkTest/HttpClientTest.cpp as a sample
|
Please refer to samples/TestCpp/Classes/ExtensionTest/NetworkTest/HttpClientTest.cpp as a sample
|
||||||
@since v2.0.2
|
@since v2.0.2
|
||||||
*/
|
*/
|
||||||
class CCHttpResponse : public cocos2d::CCObject
|
class CCHttpResponse : public CCObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** Constructor, it's used by CCHttpClient internal, users don't need to create HttpResponse manually
|
/** Constructor, it's used by CCHttpClient internal, users don't need to create HttpResponse manually
|
||||||
|
|
Loading…
Reference in New Issue