! CCDisplayManager manages CCBone's display More...
#include <CCDisplayManager.h>
Public Member Functions | |
CCDisplayManager () | |
~CCDisplayManager () | |
bool | init (CCBone *bone) |
virtual void | initDisplayList (CCBoneData *boneData) |
Use CCBoneData to init the display list. More... | |
void | addDisplay (CCDisplayData *displayData, int index) |
Add display and use _DisplayData init the display. More... | |
void | addDisplay (CCNode *display, int index) |
void | removeDisplay (int index) |
CCArray * | getDecorativeDisplayList () |
CC_DEPRECATED_ATTRIBUTE void | changeDisplayByIndex (int index, bool force) |
CC_DEPRECATED_ATTRIBUTE void | changeDisplayByName (const char *name, bool force) |
void | changeDisplayWithIndex (int index, bool force) |
Change display by index. More... | |
void | changeDisplayWithName (const char *name, bool force) |
CCNode * | getDisplayRenderNode () |
DisplayType | getDisplayRenderNodeType () |
int | getCurrentDisplayIndex () |
virtual void | setCurrentDecorativeDisplay (CCDecorativeDisplay *decoDisplay) |
virtual CCDecorativeDisplay * | getCurrentDecorativeDisplay () |
virtual CCDecorativeDisplay * | getDecorativeDisplayByIndex (int index) |
virtual void | setVisible (bool visible) |
Sets whether the display is visible The default value is true, a node is default to visible. More... | |
virtual bool | isVisible () |
Determines if the display is visible. More... | |
CCSize | getContentSize () |
CCRect | getBoundingBox () |
CCPoint | getAnchorPoint () |
CCPoint | getAnchorPointInPoints () |
virtual bool | containPoint (CCPoint &_point) |
Check if the position is inside the bone. More... | |
virtual bool | containPoint (float x, float y) |
Check if the position is inside the bone. More... | |
Public Member Functions inherited from CCObject | |
CCObject (void) | |
virtual | ~CCObject (void) |
void | release (void) |
void | retain (void) |
CCObject * | autorelease (void) |
CCObject * | copy (void) |
bool | isSingleReference (void) const |
unsigned int | retainCount (void) const |
virtual bool | isEqual (const CCObject *pObject) |
virtual void | acceptVisitor (CCDataVisitor &visitor) |
virtual void | update (float dt) |
Public Member Functions inherited from CCCopying | |
virtual CCObject * | copyWithZone (CCZone *pZone) |
Static Public Member Functions | |
static CCDisplayManager * | create (CCBone *bone) |
Public Attributes | |
virtual bool getForceChangeDisplay(void)\n\n public bool | m_bVisible |
getForceChangeDisplay More... | |
CCBone * | m_pBone |
Public Attributes inherited from CCObject | |
unsigned int | m_uID |
int | m_nLuaID |
Protected Attributes | |
CCArray * | m_pDecoDisplayList |
CCNode * | m_pDisplayRenderNode |
Display render node. More... | |
DisplayType | m_eDisplayType |
Display render node type. More... | |
CCDecorativeDisplay * | m_pCurrentDecoDisplay |
Include current display information, like contour sprite, etc. More... | |
int | m_iDisplayIndex |
Current display index. More... | |
bool | m_bForceChangeDisplay |
Protected Attributes inherited from CCObject | |
unsigned int | m_uReference |
unsigned int | m_uAutoReleaseCount |
! CCDisplayManager manages CCBone's display
CCDisplayManager | ( | ) |
~CCDisplayManager | ( | ) |
void addDisplay | ( | CCDisplayData * | displayData, |
int | index | ||
) |
Add display and use _DisplayData init the display.
If index already have a display, then replace it. If index is current display index, then also change display to _index
displayData | it include the display information, like DisplayType. If you want to create a sprite display, then create a CCSpriteDisplayData param |
index | the index of the display you want to replace or add to -1 : append display from back |
void addDisplay | ( | CCNode * | display, |
int | index | ||
) |
CC_DEPRECATED_ATTRIBUTE void changeDisplayByIndex |
( | int | index, |
bool | force | ||
) |
CC_DEPRECATED_ATTRIBUTE void changeDisplayByName |
( | const char * | name, |
bool | force | ||
) |
void changeDisplayWithIndex | ( | int | index, |
bool | force | ||
) |
Change display by index.
You can just use this method to change display in the display list. The display list is just used for this bone, and it is the displays you may use in every frame.
Note : if index is the same with prev index, the method will not effect
index | The index of the display you want to change |
force | If true, then force change display to specified display, or current display will set to display index edit in the flash every key frame. |
void changeDisplayWithName | ( | const char * | name, |
bool | force | ||
) |
|
virtual |
Check if the position is inside the bone.
|
virtual |
Check if the position is inside the bone.
|
static |
CCPoint getAnchorPoint | ( | ) |
CCPoint getAnchorPointInPoints | ( | ) |
CCRect getBoundingBox | ( | ) |
CCSize getContentSize | ( | ) |
|
virtual |
int getCurrentDisplayIndex | ( | ) |
|
virtual |
CCArray* getDecorativeDisplayList | ( | ) |
CCNode* getDisplayRenderNode | ( | ) |
DisplayType getDisplayRenderNodeType |
( | ) |
bool init | ( | CCBone * | bone) |
|
virtual |
Use CCBoneData to init the display list.
If display is a sprite, and it have texture info in the TexutreData, then use TexutreData to init the display's anchor point If the display is a CCArmature, then create a new CCArmature
|
virtual |
Determines if the display is visible.
void removeDisplay | ( | int | index) |
|
virtual |
|
virtual |
Sets whether the display is visible The default value is true, a node is default to visible.
visible | true if the node is visible, false if the node is hidden. |
|
protected |
virtual bool getForceChangeDisplay (void)\n \n public bool m_bVisible |
getForceChangeDisplay
setForceChangeDisplay Whether of not the bone is visible. Default is true
|
protected |
Display render node type.
|
protected |
Current display index.
CCBone* m_pBone |
|
protected |
Include current display information, like contour sprite, etc.
|
protected |
|
protected |
Display render node.