mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 23:34:53 +08:00
Allow SkeletonBinary and SkeletonJson to own externally created AttachmentLoader (#1846)
This commit is contained in:
parent
5cb54bdf9c
commit
fb3ca1702e
@ -80,7 +80,7 @@ namespace spine {
|
||||
|
||||
explicit SkeletonBinary(Atlas* atlasArray);
|
||||
|
||||
explicit SkeletonBinary(AttachmentLoader* attachmentLoader);
|
||||
explicit SkeletonBinary(AttachmentLoader* attachmentLoader, bool ownsLoader = false);
|
||||
|
||||
~SkeletonBinary();
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ class SP_API SkeletonJson : public SpineObject {
|
||||
public:
|
||||
explicit SkeletonJson(Atlas *atlas);
|
||||
|
||||
explicit SkeletonJson(AttachmentLoader *attachmentLoader);
|
||||
explicit SkeletonJson(AttachmentLoader *attachmentLoader, bool ownsLoader = false);
|
||||
|
||||
~SkeletonJson();
|
||||
|
||||
|
||||
@ -80,8 +80,8 @@ SkeletonBinary::SkeletonBinary(Atlas *atlasArray) : _attachmentLoader(
|
||||
|
||||
}
|
||||
|
||||
SkeletonBinary::SkeletonBinary(AttachmentLoader *attachmentLoader) : _attachmentLoader(attachmentLoader), _error(),
|
||||
_scale(1), _ownsLoader(false)
|
||||
SkeletonBinary::SkeletonBinary(AttachmentLoader* attachmentLoader, bool ownsLoader) : _attachmentLoader(attachmentLoader), _error(),
|
||||
_scale(1), _ownsLoader(ownsLoader)
|
||||
{
|
||||
assert(_attachmentLoader != NULL);
|
||||
}
|
||||
|
||||
@ -108,8 +108,8 @@ SkeletonJson::SkeletonJson(Atlas *atlas) : _attachmentLoader(new(__FILE__, __LIN
|
||||
_scale(1), _ownsLoader(true)
|
||||
{}
|
||||
|
||||
SkeletonJson::SkeletonJson(AttachmentLoader *attachmentLoader) : _attachmentLoader(attachmentLoader), _scale(1),
|
||||
_ownsLoader(false)
|
||||
SkeletonJson::SkeletonJson(AttachmentLoader *attachmentLoader, bool ownsLoader) : _attachmentLoader(attachmentLoader), _scale(1),
|
||||
_ownsLoader(ownsLoader)
|
||||
{
|
||||
assert(_attachmentLoader != NULL);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user