mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-07 11:16:53 +08:00
[cocos2d-x] Closes #612, added SkeletonBatch::destroyInstance for testing purposes
This commit is contained in:
parent
82adb733cb
commit
2a32c3e113
@ -51,6 +51,13 @@ SkeletonBatch* SkeletonBatch::getInstance () {
|
|||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SkeletonBatch::destroyInstance () {
|
||||||
|
if (instance) {
|
||||||
|
delete instance;
|
||||||
|
instance = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SkeletonBatch::SkeletonBatch (int capacity) :
|
SkeletonBatch::SkeletonBatch (int capacity) :
|
||||||
_capacity(capacity), _position(0)
|
_capacity(capacity), _position(0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -46,6 +46,8 @@ public:
|
|||||||
|
|
||||||
static SkeletonBatch* getInstance ();
|
static SkeletonBatch* getInstance ();
|
||||||
|
|
||||||
|
static void destroyInstance ();
|
||||||
|
|
||||||
void update (float delta);
|
void update (float delta);
|
||||||
|
|
||||||
void addCommand (cocos2d::Renderer* renderer, float globalOrder, GLuint textureID, cocos2d::GLProgramState* glProgramState,
|
void addCommand (cocos2d::Renderer* renderer, float globalOrder, GLuint textureID, cocos2d::GLProgramState* glProgramState,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user