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
@ -50,6 +50,13 @@ SkeletonBatch* SkeletonBatch::getInstance () {
|
|||||||
if (!instance) instance = new SkeletonBatch(8192);
|
if (!instance) instance = new SkeletonBatch(8192);
|
||||||
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)
|
||||||
|
|||||||
@ -45,6 +45,8 @@ public:
|
|||||||
static void setBufferSize (int vertexCount);
|
static void setBufferSize (int vertexCount);
|
||||||
|
|
||||||
static SkeletonBatch* getInstance ();
|
static SkeletonBatch* getInstance ();
|
||||||
|
|
||||||
|
static void destroyInstance ();
|
||||||
|
|
||||||
void update (float delta);
|
void update (float delta);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user