2011-06-14 14:31:25 +08:00
|
|
|
namespace cocos2d {
|
|
|
|
enum {
|
|
|
|
kCCNodeTagInvalid = -1,
|
|
|
|
};
|
|
|
|
|
|
|
|
class CCNode : public CCObject, public SelectorProtocol
|
|
|
|
{
|
2011-07-18 10:28:25 +08:00
|
|
|
CCNode();
|
|
|
|
int getZOrder();
|
2011-06-14 14:31:25 +08:00
|
|
|
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 getPosition();
|
|
|
|
void setPosition(CCPoint newPosition);
|
2011-07-08 22:32:54 +08:00
|
|
|
|
|
|
|
float getSkewX();
|
|
|
|
void setSkewX(float skewX);
|
|
|
|
float getSkewY();
|
|
|
|
void setSkewY(float skewY);
|
|
|
|
|
2011-06-14 14:31:25 +08:00
|
|
|
CCMutableArray<CCNode*> * getChildren();
|
|
|
|
CCCamera* getCamera();
|
|
|
|
CCGridBase* getGrid();
|
|
|
|
void setGrid(CCGridBase* pGrid);
|
|
|
|
bool getIsVisible();
|
|
|
|
void setIsVisible(bool var);
|
|
|
|
CCPoint getAnchorPoint();
|
|
|
|
void setAnchorPoint(CCPoint point);
|
|
|
|
CCPoint getAnchorPointInPixels();
|
2011-07-18 10:28:25 +08:00
|
|
|
CCSize getContentSizeInPixels();
|
|
|
|
void setContentSizeInPixels(CCSize sz);
|
2011-06-14 14:31:25 +08:00
|
|
|
CCSize getContentSize();
|
|
|
|
void setContentSize(CCSize size);
|
|
|
|
bool getIsRunning();
|
2011-07-18 10:28:25 +08:00
|
|
|
CCNode* getParent();
|
2011-06-14 14:31:25 +08:00
|
|
|
void setParent(CCNode * var);
|
|
|
|
bool getIsRelativeAnchorPoint();
|
|
|
|
void setIsRelativeAnchorPoint(bool newValue);
|
2011-07-18 10:28:25 +08:00
|
|
|
int getTag();
|
2011-06-14 14:31:25 +08:00
|
|
|
void setTag(int var);
|
|
|
|
void* getUserData();
|
|
|
|
void setUserData(void *var);
|
|
|
|
void onEnter();
|
|
|
|
void onEnterTransitionDidFinish();
|
|
|
|
void onExit();
|
|
|
|
void addChild(CCNode * child);
|
|
|
|
void addChild(CCNode * child, int zOrder);
|
|
|
|
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);
|
|
|
|
CCAction* runAction(CCAction* action);
|
|
|
|
void stopAllActions(void);
|
|
|
|
void stopAction(CCAction* action);
|
|
|
|
void stopActionByTag(int tag);
|
|
|
|
CCAction* getActionByTag(int tag);
|
|
|
|
char * description(void);
|
|
|
|
CCNode* getChildByTag(int tag);
|
2011-07-08 22:32:54 +08:00
|
|
|
unsigned int numberOfRunningActions(void);
|
2011-06-14 14:31:25 +08:00
|
|
|
//bool isScheduled(SEL_SCHEDULE selector);
|
|
|
|
void scheduleUpdate(void);
|
|
|
|
void scheduleUpdateWithPriority(int priority);
|
|
|
|
void unscheduleUpdate(void);
|
|
|
|
//void schedule(SEL_SCHEDULE selector);
|
|
|
|
//void schedule(SEL_SCHEDULE selector, ccTime interval);
|
|
|
|
//void unschedule(SEL_SCHEDULE selector);
|
2011-06-20 17:31:38 +08:00
|
|
|
|
2011-06-14 14:31:25 +08:00
|
|
|
void unscheduleAllSelectors(void);
|
|
|
|
void resumeSchedulerAndActions(void);
|
|
|
|
void pauseSchedulerAndActions(void);
|
|
|
|
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);
|
|
|
|
void removeFromParentAndCleanup(bool cleanup);
|
|
|
|
void removeChildByTag(int tag, bool cleanup);
|
|
|
|
|
|
|
|
static CCNode * node(void);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
}//namespace cocos2d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|