mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
Allow SkeletonBinary and SkeletonJson to own externally created AttachmentLoader (#1846)
This commit is contained in:
parent
25d7f8266f
commit
63ef1938b9
@ -68,7 +68,7 @@ namespace spine {
|
||||
|
||||
explicit SkeletonBinary(Atlas* atlasArray);
|
||||
|
||||
explicit SkeletonBinary(AttachmentLoader* attachmentLoader);
|
||||
explicit SkeletonBinary(AttachmentLoader* attachmentLoader, bool ownsLoader = false);
|
||||
|
||||
~SkeletonBinary();
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@ class SP_API SkeletonJson : public SpineObject {
|
||||
public:
|
||||
explicit SkeletonJson(Atlas *atlas);
|
||||
|
||||
explicit SkeletonJson(AttachmentLoader *attachmentLoader);
|
||||
explicit SkeletonJson(AttachmentLoader *attachmentLoader, bool ownsLoader = false);
|
||||
|
||||
~SkeletonJson();
|
||||
|
||||
|
||||
@ -98,8 +98,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);
|
||||
}
|
||||
|
||||
@ -84,8 +84,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