Closed pandamicro closed 9 years ago
It have been reported here: https://github.com/cocos2d/cocos2d-x/issues/10185
Related PRs:
We need to update SkeletonAnimation's event system in Web Engine with the same APIs in Native Engine.
It will be done in v3.4
@dingpinglv Can you upgrade the SkeletonAnimation's event system API with the latest version ?
https://github.com/cocos2d/cocos2d-html5/pull/2758
Spine Runtime for html5 upgraded
The SkeletonAnimation's event system APIs has been updated at: https://github.com/cocos2d/cocos2d-html5/pull/2772
原来代码 bool SkeletonRenderer::setAttachment (const std::string& slotName, const std::string& attachmentName) { return spSkeleton_setAttachment(_skeleton, slotName.c_str(), attachmentName.c_str()) ? true : false; }
改为
bool SkeletonRenderer::setAttachment (const std::string& slotName, const std::string& attachmentName) { return spSkeleton_setAttachment(_skeleton, slotName.c_str(), attachmentName.empty() ? nullptr : attachmentName.c_str()) ? true : false; }
原因attachment May be 0 to clear the attachment for the slot 设置slot后就不能设置隐藏