2012-08-10 18:14:04 +08:00
|
|
|
enum {
|
|
|
|
kCCNodeTagInvalid = -1,
|
|
|
|
};
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 15:58:10 +08:00
|
|
|
enum {
|
|
|
|
kCCNodeOnEnter,
|
|
|
|
kCCNodeOnExit
|
|
|
|
};
|
|
|
|
|
2012-01-30 17:47:47 +08:00
|
|
|
class CCNode : public CCObject
|
2011-06-14 14:31:25 +08:00
|
|
|
{
|
2012-02-02 14:26:38 +08:00
|
|
|
int getZOrder();
|
|
|
|
float getVertexZ();
|
|
|
|
void setVertexZ(float var);
|
|
|
|
float getRotation();
|
|
|
|
void setRotation(float newRotation);
|
|
|
|
float getScale();
|
|
|
|
void setScale(float scale);
|
|
|
|
float getScaleX();
|
|
|
|
void setScaleX(float newScaleX);
|
|
|
|
float getScaleY();
|
|
|
|
void setScaleY(float newScaleY);
|
|
|
|
CCPoint getPositionLua();
|
|
|
|
void getPosition(float* x = 0, float* y = 0);
|
|
|
|
float getPositionX();
|
|
|
|
float getPositionY();
|
|
|
|
void setPosition(float x, float y);
|
2012-08-09 12:46:45 +08:00
|
|
|
void setPosition(CCPoint pos);
|
2012-02-02 14:26:38 +08:00
|
|
|
void setPositionX(float x);
|
|
|
|
void setPositionY(float y);
|
|
|
|
float getSkewX();
|
|
|
|
void setSkewX(float skewX);
|
|
|
|
float getSkewY();
|
|
|
|
void setSkewY(float skewY);
|
2012-06-15 17:26:11 +08:00
|
|
|
bool isVisible();
|
|
|
|
void setVisible(bool var);
|
2012-02-02 14:26:38 +08:00
|
|
|
CCPoint getAnchorPoint();
|
|
|
|
void setAnchorPoint(CCPoint point);
|
|
|
|
CCSize getContentSize();
|
2012-08-10 18:14:04 +08:00
|
|
|
void setContentSize(const CCSize & size);
|
2012-02-02 14:26:38 +08:00
|
|
|
int getTag();
|
|
|
|
void setTag(int var);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-04-09 00:10:12 +08:00
|
|
|
CCArray* getChildren();
|
2012-02-02 14:26:38 +08:00
|
|
|
unsigned int getChildrenCount(void);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
CCCamera* getCamera();
|
|
|
|
CCGridBase* getGrid();
|
|
|
|
void setGrid(CCGridBase* pGrid);
|
2012-08-10 18:14:04 +08:00
|
|
|
CCPoint getAnchorPointInPoints();
|
2012-06-15 17:26:11 +08:00
|
|
|
bool isRunning();
|
2012-02-02 14:26:38 +08:00
|
|
|
CCNode* getParent();
|
|
|
|
void setParent(CCNode * var);
|
2012-06-15 17:26:11 +08:00
|
|
|
bool isIgnoreAnchorPointForPosition();
|
|
|
|
void ignoreAnchorPointForPosition(bool newValue);
|
2012-02-02 14:26:38 +08:00
|
|
|
void* getUserData();
|
|
|
|
void setUserData(void *var);
|
2012-08-10 18:14:04 +08:00
|
|
|
CCObject* getUserObject();
|
|
|
|
void setUserObject(CCObject* pObject);
|
|
|
|
CCGLProgram* getShaderProgram();
|
|
|
|
void setShaderProgram(CCGLProgram* pShaderProgram);
|
|
|
|
int getOrderOfArrival();
|
|
|
|
void setOrderOfArrival(int order);
|
|
|
|
ccGLServerState getGLServerState();
|
|
|
|
void setGLServerState(ccGLServerState state);
|
|
|
|
CCActionManager* getActionManager();
|
|
|
|
void setActionManager(CCActionManager* pActionMgr);
|
2012-08-31 18:29:44 +08:00
|
|
|
ccGLServerState getGLServerState(void);
|
|
|
|
void setGLServerState(ccGLServerState state);
|
2012-08-10 18:14:04 +08:00
|
|
|
CCScheduler* getScheduler();
|
|
|
|
void setScheduler(CCScheduler* pScheduler);
|
2012-08-28 14:53:52 +08:00
|
|
|
void addChild(CCNode * child);
|
|
|
|
void addChild(CCNode * child, int zOrder);
|
2012-02-02 14:26:38 +08:00
|
|
|
void addChild(CCNode * child, int zOrder, int tag);
|
|
|
|
void removeChild(CCNode* child, bool cleanup);
|
|
|
|
void removeAllChildrenWithCleanup(bool cleanup);
|
|
|
|
void reorderChild(CCNode * child, int zOrder);
|
|
|
|
void cleanup(void);
|
|
|
|
void draw(void);
|
|
|
|
void visit(void);
|
|
|
|
void transform(void);
|
|
|
|
void transformAncestors(void);
|
|
|
|
CCRect boundingBox(void);
|
|
|
|
|
2012-08-30 15:33:54 +08:00
|
|
|
CCAction* runAction(CCAction* action);
|
2012-02-02 14:26:38 +08:00
|
|
|
void stopAllActions(void);
|
|
|
|
void stopAction(CCAction* action);
|
|
|
|
|
|
|
|
void stopActionByTag(int tag);
|
|
|
|
CCAction* getActionByTag(int tag);
|
|
|
|
char * description(void);
|
|
|
|
CCNode* getChildByTag(int tag);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
unsigned int numberOfRunningActions(void);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
CCAffineTransform nodeToParentTransform(void);
|
|
|
|
CCAffineTransform parentToNodeTransform(void);
|
|
|
|
CCAffineTransform nodeToWorldTransform(void);
|
|
|
|
CCAffineTransform worldToNodeTransform(void);
|
|
|
|
|
|
|
|
CCPoint convertToNodeSpace(CCPoint worldPoint);
|
|
|
|
CCPoint convertToWorldSpace(CCPoint nodePoint);
|
|
|
|
CCPoint convertToNodeSpaceAR(CCPoint worldPoint);
|
|
|
|
CCPoint convertToWorldSpaceAR(CCPoint nodePoint);
|
|
|
|
CCPoint convertTouchToNodeSpace(CCTouch * touch);
|
|
|
|
CCPoint convertTouchToNodeSpaceAR(CCTouch * touch);
|
|
|
|
|
2012-02-02 15:58:10 +08:00
|
|
|
void removeFromParentAndCleanup(bool cleanup);
|
|
|
|
void removeChildByTag(int tag, bool cleanup);
|
|
|
|
|
2012-12-10 14:07:24 +08:00
|
|
|
void scheduleUpdateScriptHandlerWithPriority(LUA_FUNCTION nHandler, int priority);
|
2012-08-29 17:10:06 +08:00
|
|
|
void unscheduleUpdate(void);
|
|
|
|
|
2012-02-02 15:58:10 +08:00
|
|
|
void registerScriptHandler(LUA_FUNCTION funcID);
|
|
|
|
void unregisterScriptHandler(void);
|
2012-02-02 14:26:38 +08:00
|
|
|
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCNode * create(void);
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|