{"id":329229,"date":"2022-02-07T21:00:20","date_gmt":"2022-02-07T21:00:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=329229"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2022-02-07T21:00:20","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=329229","title":{"rendered":"<span>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0438\u0433\u0440\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0438\u0433\u0440\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435\" title=\"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0438\u0433\u0440\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435\" height=\"auto\" data-src=\"https:\/\/habrastorage.org\/webt\/wc\/cj\/d_\/wccjd_gcfshq7pcq3cdmhdedcdu.png\" data-width=\"auto\"\/><figcaption>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0438\u0433\u0440\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435<\/figcaption><\/figure>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/600057\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u0431\u044b\u043b\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f \u043a \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043a\u043e\u0441\u0442\u0435\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u043d\u0443\u0436\u043d\u043e \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 &#8212; \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f \u0438\u0437 \u043a\u043e\u0441\u0442\u0435\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430.<\/p>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u043a\u043e\u0441\u0442\u0435\u0439 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0438\u0433\u0440\u043e\u0432\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445.<\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0434\u0432\u0443\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u0412 CocoStudio \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f, \u0440\u0430\u043d\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 Bone c \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0435\u0439.<\/p>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044c CocoStudio void JCEngine::_destroyCCSFinal(float \/*dt*\/) {   Node *owner = physicsBody_->getOwner(); cocostudio::Bone *boneEngine = static_cast&lt;cocostudio::Armature*>(owner)->getBone(\"engine\"); if (boneEngine) static_cast&lt;cocostudio::Armature*>(owner)->removeBone(boneEngine, false);  armature_ = nullptr; }<\/code><\/pre>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <a href=\"https:\/\/docs.egret.com\/dragonbones\/en\" rel=\"noopener noreferrer nofollow\">Dragonbones<\/a> \u043a\u0440\u043e\u043c\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f, \u0440\u0430\u043d\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e Slot \u0441 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0435\u0439,<\/p>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044c Dragonbones void JCEngine::_destroyDGBFinal(float \/*dt*\/) { Node *owner = physicsBody_->getOwner(); auto slotEngine = static_cast&lt;dragonBones::CCArmatureDisplay*>(owner)->getArmature()->getSlot(\"engine\"); if (slotEngine) static_cast&lt;dragonBones::CCArmatureDisplay*>(owner)->getArmature()->removeSlot(slotEngine);  armature_->removeFromParent(); this->_disposeArmature(); armature_ = nullptr; }<\/code><\/pre>\n<p>\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434 <a href=\"https:\/\/github.com\/DragonBones\/DragonBonesCPP\" rel=\"noopener noreferrer nofollow\">DragonBonesC++ RunTime<\/a>. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432:<\/p>\n<p><em>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u00a0{project folder}\\Classes\\dragonBones\\armature, \u0444\u0430\u0439\u043b\u00a0Slot.h<\/em>\u00a0<\/p>\n<p>\u0441\u0442\u0440\u043e\u043a\u0430 152, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<pre><code class=\"cpp\">void clearSlot();<\/code><\/pre>\n<p><em>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u00a0{project folder}\\Classes\\dragonBones\\armature, \u0444\u0430\u0439\u043b\u00a0Slot.cpp<\/em><\/p>\n<p>\u0421\u0442\u0440\u043e\u043a\u0430 16, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e<\/p>\n<pre><code class=\"cpp\">\/\/ \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u0441\u043b\u043e\u0442\u0430 \u043f\u0440\u0438 \u0435\u0433\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 void Slot::clearSlot() {   _onClear(); }<\/code><\/pre>\n<p><em>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u00a0{project folder}\\Classes\\dragonBones\\armature, \u0444\u0430\u0439\u043b\u00a0Armature.h<\/em>\u00a0<\/p>\n<p>\u0441\u0442\u0440\u043e\u043a\u0430 311, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<pre><code class=\"cpp\">void removeSlot(Slot *value);<\/code><\/pre>\n<p><em>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f {project folder}\\Classes\\dragonBones\\armature, \u0444\u0430\u0439\u043b\u00a0Armature.cpp<\/em><\/p>\n<p>\u0441\u0442\u0440\u043e\u043a\u0430 462, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e<\/p>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0441\u043b\u043e\u0442 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u043b\u043e\u0442\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 void Armature::removeSlot(Slot* value) {   _slots.erase(std::find(_slots.begin(), _slots.end(), value));   value->clearSlot(); }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0434\u0438\u043d \u0442\u043e\u043d\u043a\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u043a\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430. \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0440\u0430\u0441\u0447\u0451\u0442\u043e\u0432 \u0434\u0432\u0438\u0436\u043a\u0430. <\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0432 \u0438\u0433\u0440\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0443\u0448\u0435\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441 \u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a  \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 \u043f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0432\u0438\u0436\u043a\u0430.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430, \u043d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c, \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435.<\/p>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 CocoStudio void JCEngine::_onCCSAnimationEvent(cocostudio::Armature* \/*armature*\/, cocostudio::MovementEventType movementType, const std::string&amp; movementID) { if (movementType == cocostudio::MovementEventType::COMPLETE) { if (movementID.compare(\"Destroy\") == 0) { Director::getInstance()->getScheduler()->schedule(CC_SCHEDULE_SELECTOR(JCEngine::_destroyCCSFinal), this, 0.0f, 0.0f, 0.0f, false); } } }<\/code><\/pre>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u0440\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 Dragonbones void JCEngine::_onDGBAnimationEvent(cocos2d::EventCustom* event) { const auto eventObject = (dragonBones::EventObject*)event->getUserData(); if (eventObject->animationState->name.compare(\"Destroy\") == 0) { Director::getInstance()->getScheduler()->schedule(CC_SCHEDULE_SELECTOR(JCEngine::_destroyDGBFinal), this, 0.0f, 0.0f, 0.0f, false); } }<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432 \u043a \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0432 CocoStudio \u0438 Dragonbones.<\/p>\n<p><a href=\"https:\/\/github.com\/cocos2d\/cocos2d-x\/tree\/cocos2d-x-2.2.6\" rel=\"noopener noreferrer nofollow\">\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/a> \u0434\u0432\u0438\u0436\u043a\u0430, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0448\u0435\u0439\u0434\u0435\u0440 \u043a \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 CocoStudio \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u041d\u043e <a href=\"https:\/\/github.com\/cocos2d\/cocos2d-x\/tree\/cocos2d-x-3.17.2\" rel=\"noopener noreferrer nofollow\">\u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/a> cocos2d-x \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0448\u0435\u0439\u0434\u0435\u0440 \u043a\u043e \u0432\u0441\u0435\u043c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 Dragonbones \u0448\u0435\u0439\u0434\u0435\u0440 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0434\u0432\u0438\u0436\u043a\u0430 \u043a\u043e \u0432\u0441\u0435\u043c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"\u0448\u0435\u0439\u0434\u0435\u0440\u044b\" title=\"\u0448\u0435\u0439\u0434\u0435\u0440\u044b\" height=\"auto\" data-src=\"https:\/\/habrastorage.org\/webt\/l0\/zn\/5k\/l0zn5kdy-nfzi9im88l-lbp2aqy.png\" data-width=\"auto\"\/><figcaption>\u0448\u0435\u0439\u0434\u0435\u0440\u044b<\/figcaption><\/figure>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0448\u0435\u0439\u0434\u0435\u0440\u0430\u043c\u0438 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<pre><code class=\"cpp\">\/\/ \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0448\u0435\u0439\u0434\u0435\u0440\u0430 void JCChangeColor::_applyShader(Node *node, int tag) { if (!node) return;  Sprite *sprite = dynamic_cast&lt;Sprite*>(node); cocostudio::Armature *ccsArmature = dynamic_cast&lt;cocostudio::Armature*>(node);  if (ccsArmature) this->_applyShaderCCSBones(ccsArmature, tag); else this->_applyShaderNode(sprite, tag);  auto children = node->getChildren(); for (auto child : children) { this->_applyShader(child, tag); } }<\/code><\/pre>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0448\u0435\u0439\u0434\u0435\u0440 \u043a \u043d\u043e\u0434\u0435 void JCChangeColor::_applyShaderNode(Node *node, int tag) { if (!node) return;  if (tag >= 0) { GLProgram* program = new GLProgram(); program->initWithByteArrays(ccPositionTextureColor_noMVP_vert, szEffectFragSource);  node->setGLProgram(program);          program->autorelease(); CHECK_GL_ERROR_DEBUG();  program->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_POSITION, GLProgram::VERTEX_ATTRIB_POSITION); program->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_COLOR, GLProgram::VERTEX_ATTRIB_COLOR); program->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_TEX_COORD, GLProgram::VERTEX_ATTRIB_TEX_COORDS); CHECK_GL_ERROR_DEBUG();  program->link(); CHECK_GL_ERROR_DEBUG();  program->updateUniforms(); CHECK_GL_ERROR_DEBUG();  GLint location = program->getUniformLocationForName(\"matrixEffect\"); program->use(); program->setUniformLocationWithMatrix4fv(location, matrices_[tag].matrix, 1); } else { node->setGLProgram(GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP)); } }<\/code><\/pre>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0448\u0435\u0439\u0434\u0435\u0440 \u043a\u043e \u0432\u0441\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 CocoStudio void JCChangeColor::_applyShaderCCSBones(cocostudio::Armature *armature, int tag) { const cocos2d::Map&lt;std::string, cocostudio::Bone*> boneDic = armature->getBoneDic(); for (auto&amp; object : boneDic) { cocostudio::Bone *bone = object.second; if (bone) { const Vector&lt;cocostudio::DecorativeDisplay*> list = bone->getDisplayManager()->getDecorativeDisplayList(); for (auto&amp; display : list) { Node* node = display->getDisplay(); this->_applyShaderNode(node, tag); } } } }<\/code><\/pre>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438. \u0412 \u0441\u0432\u043e\u0435\u043c \u0438\u0433\u0440\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432\" title=\"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432\" height=\"auto\" data-src=\"https:\/\/habrastorage.org\/webt\/zc\/rm\/sq\/zcrmsqb92flpi4qxo_5bkzfkm8y.png\" data-width=\"auto\"\/><figcaption>\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/figcaption><\/figure>\n<p>\u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0422.\u0435. \u043f\u043e\u043a\u0430 \u044f \u043f\u0438\u0448\u0443 \u043a\u043e\u0434, \u043c\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u043c\u043e\u0436\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u043c\u043e\u0433\u0443 \u0438\u0441\u043f\u044b\u0442\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438\u043b\u0438 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0443\u0440\u043e\u0432\u043d\u0438 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0441\u0435\u0439 \u0438\u0433\u0440\u044b \u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0432\u043c\u0435\u0441\u0442\u0435 \u043e\u043a\u043e\u043b\u043e 8 \u043b\u0435\u0442, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e \u043f\u0430\u043b\u044c\u0446\u0430\u043c \u0434\u0432\u0443\u0445 \u0440\u0443\u043a. \u042d\u0442\u043e \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0438 \u043e \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0430\u0445 \u043f\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0439 \u0441\u0432\u044f\u0437\u0438, \u043e\u043d\u0438 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u0434\u043a\u0438\u0435.<\/p>\n<p>\u042f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u043b\u0435\u043a\u0441\u044f \u043e\u0442 \u0442\u0435\u043c\u044b \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0443 \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u043b\u044f \u043d\u0435\u0433\u043e JSON \u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438. \u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u042f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u0438 &#8212; \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u043b\u0430.<\/p>\n<pre><code class=\"json\">[{ \"Armature\":\"Crocco\", \"ArmatureType\":1, \"ArmatureTransform\":\"TransformEffect0\", \"Icon\":\"CroccoDB\", \"PhysicsBody\": { \"Width\":270, \"Height\":525, \"ShiftX\":0, \"ShiftY\":0 } }]<\/code><\/pre>\n<p>\u041b\u044e\u0431\u043e\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0438\u0433\u0440\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u0432 CocoStudio \u0438\u043b\u0438 Dragonbones. \u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435, \u043a\u0440\u043e\u043c\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 <em>&#171;Armature&#187;:&#187;Crocco&#187;<\/em>, \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0435\u0449\u0435 \u0442\u0438\u043f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 <em>&#171;ArmatureType&#187;:1<\/em>.<\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0435\u0441\u043b\u0438 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \u0442\u0438\u043f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u043d\u0430\u0448 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0432 CocoStudio \u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u0442\u0438\u043f\u043e\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0434 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0443\u0442\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a.<\/p>\n<pre><code class=\"cpp\">if (!setting.armature.empty())   this->_addPathAnimation(PathAnamitionsPersons + setting.armature, setting.armatureType);<\/code><\/pre>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0443\u0442\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 void JCResourcesData::_addPathAnimation(const std::string &amp;pathAnimations, int armatureType) { pathAnimations_.push_back(std::pair&lt;std::string, int>(pathAnimations, armatureType)); }<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u0441\u0435 \u043f\u0443\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0441\u043f\u0438\u0441\u043e\u043a, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>\u0412 \u0438\u0433\u0440\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0443 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043c\u044b \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u043f\u0443\u0442\u044f\u043c\u0438 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432 void JCResourcesData::_loadAnimations() { std::sort(pathAnimations_.begin(), pathAnimations_.end()); pathAnimations_.resize(unique(pathAnimations_.begin(), pathAnimations_.end()) - pathAnimations_.begin());  itPaths_ = pathAnimations_.begin();  if (JCGlobalSetting::getInstance()->isFastLoad()) this->_updateloadAnimations(0); else Director::getInstance()->getScheduler()->schedule(CC_SCHEDULE_SELECTOR(JCResourcesData::_updateloadAnimations), this, 0, false); } <\/code><\/pre>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 void JCResourcesData::_updateloadAnimations(float \/*dt*\/) { if (listener_) { if (pathAnimations_.empty()) listener_(Percent100); else { size_t count = pathAnimations_.size(); size_t cur = itPaths_ - pathAnimations_.begin(); listener_(cur * Percent100 \/ count); } }  if (itPaths_ != pathAnimations_.end()) { if ((*itPaths_).second == JCArmatureEditor::Type::COCOSTUDIO) { if (FileUtils::getInstance()->isFileExist((*itPaths_).first + PrefixCSArmature)) ArmatureDataManager::getInstance()->addArmatureFileInfo((*itPaths_).first + PrefixCSArmature); else this->_loadDefaultAnimation((*itPaths_)); }  if ((*itPaths_).second == JCArmatureEditor::Type::DRAGONBONE) { bool isDefault = false; if (FileUtils::getInstance()->isFileExist((*itPaths_).first + PrefixDBBones)) this->_loadDragonBonesAnimation((*itPaths_).first, PrefixDBBones); else isDefault = true;  if (FileUtils::getInstance()->isFileExist((*itPaths_).first + PrefixDBAtlas)) this->_loadDragonBonesAnimation((*itPaths_).first, PrefixDBAtlas); else  isDefault = true;  if (isDefault) this->_loadDefaultAnimation((*itPaths_)); }  ++itPaths_;  if (JCGlobalSetting::getInstance()->isFastLoad()) this->_updateloadAnimations(0); } else Director::getInstance()->getScheduler()->unschedule(CC_SCHEDULE_SELECTOR(JCResourcesData::_updateloadAnimations), this); }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043d\u0435 \u0431\u044b\u043b\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430, \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u0449\u0438\u0442\u0430. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u041e\u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0430\u043c\u044b\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 \u0438\u0433\u0440\u044b.<\/p>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e void JCResourcesData::_loadDefaultAnimation(std::pair&lt;std::string, int> &amp;pathFile) { size_t pos = pathFile.first.find_last_of('\/'); std::string name = pathFile.first.substr(pos + 1, pathFile.first.back()); std::string path = pathFile.first.substr(0, pos + 1);  if (path.compare(PathAnamitionsPersons) == 0) { pathFile.second = 0; ArmatureDataManager::getInstance()->addArmatureFileInfo(DefaultPersonAnimation); this->_replacePersonArmatureName(name); } }<\/code><\/pre>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 void JCResourcesData::_replacePersonArmatureName(const std::string &amp;name) { for (auto it = personSettings_.begin(); it != personSettings_.end(); ++it) { if (it->armature.compare(name) == 0) { it->armature = DefaultPersonName; it->armatureType = 0; } } }<\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 CocoStudio \u0438\u043b\u0438 Dragonbones \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430. \u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 Dragonbones, \u0434\u0432\u0438\u0436\u043e\u043a \u0432\u044b\u0434\u0430\u0435\u0442 \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432  \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 Dragonbones \u0443 \u043d\u0430\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f.<\/p>\n<pre><code class=\"cpp\">\/\/ \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 Dragonbones void JCResourcesData::_loadDragonBonesAnimation(const std::string &amp;pathRes, const std::string &amp;prefix) { std::string path = pathRes + prefix; auto it = std::find(loadedDGBAnimationDefault_.begin(), loadedDGBAnimationDefault_.end(), path); if (it != loadedDGBAnimationDefault_.end()) return;  loadedDGBAnimationDefault_.push_back(path); const auto factory = dragonBones::CCFactory::getFactory();  if (prefix.compare(PrefixDBBones) == 0)  factory->loadDragonBonesData(path);  if (prefix.compare(PrefixDBAtlas) == 0) factory->loadTextureAtlasData(path); }<\/code><\/pre>\n<p>\u041d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432 \u0441\u0442\u0438\u043b\u0435 2.5D, \u0432 \u043d\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f 2D \u0444\u0438\u0437\u0438\u043a\u0430 <a href=\"http:\/\/chipmunk-physics.net\/\" rel=\"noopener noreferrer nofollow\">Chipmunk<\/a>.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u0437\u0438\u043a\u0438 Chipmunk\" title=\"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u0437\u0438\u043a\u0438 Chipmunk\" height=\"auto\" data-src=\"https:\/\/habrastorage.org\/webt\/sd\/7h\/ps\/sd7hpstdgkdbtemtym46bwver-k.png\" data-width=\"auto\"\/><figcaption>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u0437\u0438\u043a\u0438 Chipmunk<\/figcaption><\/figure>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0442\u0435\u043b\u043e \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f\u043c\u0438. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435\u043c \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u0438 \u0435\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u043b\u0430.<\/p>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0442\u0435\u043b\u043e void JCPerson::_createBody() { float width = personSetting_.physicsBodyInfo.width \/ 2; float height = personSetting_.physicsBodyInfo.height \/ 2; float shiftX = personSetting_.physicsBodyInfo.shiftX; float shiftY = personSetting_.physicsBodyInfo.shiftY;  Vec2 verts[] = { Vec2(width, height), Vec2(width, -height * 0.2f), Vec2(width * 0.3f, -height), Vec2(-width * 0.3f, -height), Vec2(-width, -height * 0.2f), Vec2(-width, height) }; int points = sizeof(verts) \/ sizeof(verts[0]);  if (anyArmature_->getArmatureType() == JCArmatureEditor::Type::COCOSTUDIO) { physicsBody_ = PhysicsBody::createPolygon(verts, points, PhysicsMaterial(BodyDensity, BodyRestitution, BodyFriction) , Vec2(-armature_->getContentSize().width \/ 2 + shiftX, -armature_->getContentSize().height + height + shiftY)); } else { physicsBody_ = PhysicsBody::createPolygon(verts, points, PhysicsMaterial(BodyDensity, BodyRestitution, BodyFriction) , Vec2(shiftX, shiftY)); } }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0442\u0435\u043c\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0438\u0433\u0440\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0430 cocos2d-x \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e. \u042f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442\u044b \u0432 \u044d\u0442\u043e\u0439 \u0438\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0442\u0435\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u0433\u0440 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 coco2d-x \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u0438 \u0441\u0442\u0440\u0430\u043d\u0430\u0445 \u0421\u041d\u0413 \u043c\u0430\u043b\u043e \u043e\u0441\u0432\u0435\u0449\u0430\u0435\u0442\u0441\u044f. \u041d\u0430\u0439\u0442\u0438 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043f\u043e coco2d-x \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u0438\u0448\u0443\u0449\u0438\u0445 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0441++ \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0442\u0440\u0443\u0434\u043d\u043e. \u041e\u0447\u0435\u043d\u044c \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c.<\/p>\n<p>\u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0435\u0441\u0435\u043b\u0435\u0435, \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u0438\u0434\u0435\u043e \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0430\u043b\u044c\u0444\u0430 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/62016eb0122cc8f6386969cb\" data-style=\"\" id=\"62016eb0122cc8f6386969cb\" width=\"\"><\/div>\n<p>\u0410 \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u0443-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0430\u0448\u0438\u043c \u0438\u0433\u0440\u043e\u0432\u044b\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u044f \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 <a href=\"https:\/\/boomstarter.ru\/projects\/useful\/195372\" rel=\"noopener noreferrer nofollow\">\u043a\u0440\u0430\u0443\u0434\u0444\u0430\u043d\u0434\u0438\u043d\u0433\u043e\u0432\u0443\u044e \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0443<\/a>, \u0433\u0434\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043d\u0430 \u0435\u0433\u043e \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/650279\/\"> https:\/\/habr.com\/ru\/post\/650279\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><figcaption>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0438\u0433\u0440\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435<\/figcaption><\/figure>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/600057\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u0431\u044b\u043b\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f \u043a \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043a\u043e\u0441\u0442\u0435\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u043d\u0443\u0436\u043d\u043e \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 &#8212; \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f \u0438\u0437 \u043a\u043e\u0441\u0442\u0435\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430.<\/p>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u043a\u043e\u0441\u0442\u0435\u0439 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0438\u0433\u0440\u043e\u0432\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445.<\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0434\u0432\u0443\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u0412 CocoStudio \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f, \u0440\u0430\u043d\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 Bone c \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0435\u0439.<\/p>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044c CocoStudio void JCEngine::_destroyCCSFinal(float \/*dt*\/) {   Node *owner = physicsBody_->getOwner(); cocostudio::Bone *boneEngine = static_cast&lt;cocostudio::Armature*>(owner)->getBone(\"engine\"); if (boneEngine) static_cast&lt;cocostudio::Armature*>(owner)->removeBone(boneEngine, false);  armature_ = nullptr; }<\/code><\/pre>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <a href=\"https:\/\/docs.egret.com\/dragonbones\/en\" rel=\"noopener noreferrer nofollow\">Dragonbones<\/a> \u043a\u0440\u043e\u043c\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f, \u0440\u0430\u043d\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e Slot \u0441 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0435\u0439,<\/p>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044c Dragonbones void JCEngine::_destroyDGBFinal(float \/*dt*\/) { Node *owner = physicsBody_->getOwner(); auto slotEngine = static_cast&lt;dragonBones::CCArmatureDisplay*>(owner)->getArmature()->getSlot(\"engine\"); if (slotEngine) static_cast&lt;dragonBones::CCArmatureDisplay*>(owner)->getArmature()->removeSlot(slotEngine);  armature_->removeFromParent(); this->_disposeArmature(); armature_ = nullptr; }<\/code><\/pre>\n<p>\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434 <a href=\"https:\/\/github.com\/DragonBones\/DragonBonesCPP\" rel=\"noopener noreferrer nofollow\">DragonBonesC++ RunTime<\/a>. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432:<\/p>\n<p><em>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u00a0{project folder}\\Classes\\dragonBones\\armature, \u0444\u0430\u0439\u043b\u00a0Slot.h<\/em>\u00a0<\/p>\n<p>\u0441\u0442\u0440\u043e\u043a\u0430 152, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<pre><code class=\"cpp\">void clearSlot();<\/code><\/pre>\n<p><em>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u00a0{project folder}\\Classes\\dragonBones\\armature, \u0444\u0430\u0439\u043b\u00a0Slot.cpp<\/em><\/p>\n<p>\u0421\u0442\u0440\u043e\u043a\u0430 16, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e<\/p>\n<pre><code class=\"cpp\">\/\/ \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u0441\u043b\u043e\u0442\u0430 \u043f\u0440\u0438 \u0435\u0433\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 void Slot::clearSlot() {   _onClear(); }<\/code><\/pre>\n<p><em>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u00a0{project folder}\\Classes\\dragonBones\\armature, \u0444\u0430\u0439\u043b\u00a0Armature.h<\/em>\u00a0<\/p>\n<p>\u0441\u0442\u0440\u043e\u043a\u0430 311, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<pre><code class=\"cpp\">void removeSlot(Slot *value);<\/code><\/pre>\n<p><em>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f {project folder}\\Classes\\dragonBones\\armature, \u0444\u0430\u0439\u043b\u00a0Armature.cpp<\/em><\/p>\n<p>\u0441\u0442\u0440\u043e\u043a\u0430 462, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e<\/p>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0441\u043b\u043e\u0442 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u043b\u043e\u0442\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 void Armature::removeSlot(Slot* value) {   _slots.erase(std::find(_slots.begin(), _slots.end(), value));   value->clearSlot(); }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0434\u0438\u043d \u0442\u043e\u043d\u043a\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u043a\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430. \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0440\u0430\u0441\u0447\u0451\u0442\u043e\u0432 \u0434\u0432\u0438\u0436\u043a\u0430. <\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0432 \u0438\u0433\u0440\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0443\u0448\u0435\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441 \u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a  \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 \u043f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0432\u0438\u0436\u043a\u0430.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430, \u043d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c, \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435.<\/p>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 CocoStudio void JCEngine::_onCCSAnimationEvent(cocostudio::Armature* \/*armature*\/, cocostudio::MovementEventType movementType, const std::string&amp; movementID) { if (movementType == cocostudio::MovementEventType::COMPLETE) { if (movementID.compare(\"Destroy\") == 0) { Director::getInstance()->getScheduler()->schedule(CC_SCHEDULE_SELECTOR(JCEngine::_destroyCCSFinal), this, 0.0f, 0.0f, 0.0f, false); } } }<\/code><\/pre>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u0440\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 Dragonbones void JCEngine::_onDGBAnimationEvent(cocos2d::EventCustom* event) { const auto eventObject = (dragonBones::EventObject*)event->getUserData(); if (eventObject->animationState->name.compare(\"Destroy\") == 0) { Director::getInstance()->getScheduler()->schedule(CC_SCHEDULE_SELECTOR(JCEngine::_destroyDGBFinal), this, 0.0f, 0.0f, 0.0f, false); } }<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432 \u043a \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0432 CocoStudio \u0438 Dragonbones.<\/p>\n<p><a href=\"https:\/\/github.com\/cocos2d\/cocos2d-x\/tree\/cocos2d-x-2.2.6\" rel=\"noopener noreferrer nofollow\">\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/a> \u0434\u0432\u0438\u0436\u043a\u0430, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0448\u0435\u0439\u0434\u0435\u0440 \u043a \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 CocoStudio \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u041d\u043e <a href=\"https:\/\/github.com\/cocos2d\/cocos2d-x\/tree\/cocos2d-x-3.17.2\" rel=\"noopener noreferrer nofollow\">\u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/a> cocos2d-x \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0448\u0435\u0439\u0434\u0435\u0440 \u043a\u043e \u0432\u0441\u0435\u043c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 Dragonbones \u0448\u0435\u0439\u0434\u0435\u0440 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0434\u0432\u0438\u0436\u043a\u0430 \u043a\u043e \u0432\u0441\u0435\u043c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438.<\/p>\n<figure class=\"\"><figcaption>\u0448\u0435\u0439\u0434\u0435\u0440\u044b<\/figcaption><\/figure>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0448\u0435\u0439\u0434\u0435\u0440\u0430\u043c\u0438 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<pre><code class=\"cpp\">\/\/ \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0448\u0435\u0439\u0434\u0435\u0440\u0430 void JCChangeColor::_applyShader(Node *node, int tag) { if (!node) return;  Sprite *sprite = dynamic_cast&lt;Sprite*>(node); cocostudio::Armature *ccsArmature = dynamic_cast&lt;cocostudio::Armature*>(node);  if (ccsArmature) this->_applyShaderCCSBones(ccsArmature, tag); else this->_applyShaderNode(sprite, tag);  auto children = node->getChildren(); for (auto child : children) { this->_applyShader(child, tag); } }<\/code><\/pre>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0448\u0435\u0439\u0434\u0435\u0440 \u043a \u043d\u043e\u0434\u0435 void JCChangeColor::_applyShaderNode(Node *node, int tag) { if (!node) return;  if (tag >= 0) { GLProgram* program = new GLProgram(); program->initWithByteArrays(ccPositionTextureColor_noMVP_vert, szEffectFragSource);  node->setGLProgram(program);          program->autorelease(); CHECK_GL_ERROR_DEBUG();  program->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_POSITION, GLProgram::VERTEX_ATTRIB_POSITION); program->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_COLOR, GLProgram::VERTEX_ATTRIB_COLOR); program->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_TEX_COORD, GLProgram::VERTEX_ATTRIB_TEX_COORDS); CHECK_GL_ERROR_DEBUG();  program->link(); CHECK_GL_ERROR_DEBUG();  program->updateUniforms(); CHECK_GL_ERROR_DEBUG();  GLint location = program->getUniformLocationForName(\"matrixEffect\"); program->use(); program->setUniformLocationWithMatrix4fv(location, matrices_[tag].matrix, 1); } else { node->setGLProgram(GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP)); } }<\/code><\/pre>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0448\u0435\u0439\u0434\u0435\u0440 \u043a\u043e \u0432\u0441\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 CocoStudio void JCChangeColor::_applyShaderCCSBones(cocostudio::Armature *armature, int tag) { const cocos2d::Map&lt;std::string, cocostudio::Bone*> boneDic = armature->getBoneDic(); for (auto&amp; object : boneDic) { cocostudio::Bone *bone = object.second; if (bone) { const Vector&lt;cocostudio::DecorativeDisplay*> list = bone->getDisplayManager()->getDecorativeDisplayList(); for (auto&amp; display : list) { Node* node = display->getDisplay(); this->_applyShaderNode(node, tag); } } } }<\/code><\/pre>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438. \u0412 \u0441\u0432\u043e\u0435\u043c \u0438\u0433\u0440\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<figure class=\"\"><figcaption>\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/figcaption><\/figure>\n<p>\u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0422.\u0435. \u043f\u043e\u043a\u0430 \u044f \u043f\u0438\u0448\u0443 \u043a\u043e\u0434, \u043c\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u043c\u043e\u0436\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u043c\u043e\u0433\u0443 \u0438\u0441\u043f\u044b\u0442\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438\u043b\u0438 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0443\u0440\u043e\u0432\u043d\u0438 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0441\u0435\u0439 \u0438\u0433\u0440\u044b \u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0432\u043c\u0435\u0441\u0442\u0435 \u043e\u043a\u043e\u043b\u043e 8 \u043b\u0435\u0442, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e \u043f\u0430\u043b\u044c\u0446\u0430\u043c \u0434\u0432\u0443\u0445 \u0440\u0443\u043a. \u042d\u0442\u043e \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0438 \u043e \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0430\u0445 \u043f\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0439 \u0441\u0432\u044f\u0437\u0438, \u043e\u043d\u0438 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u0434\u043a\u0438\u0435.<\/p>\n<p>\u042f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u043b\u0435\u043a\u0441\u044f \u043e\u0442 \u0442\u0435\u043c\u044b \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0443 \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u043b\u044f \u043d\u0435\u0433\u043e JSON \u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438. \u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u042f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u0438 &#8212; \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u043b\u0430.<\/p>\n<pre><code class=\"json\">[{ \"Armature\":\"Crocco\", \"ArmatureType\":1, \"ArmatureTransform\":\"TransformEffect0\", \"Icon\":\"CroccoDB\", \"PhysicsBody\": { \"Width\":270, \"Height\":525, \"ShiftX\":0, \"ShiftY\":0 } }]<\/code><\/pre>\n<p>\u041b\u044e\u0431\u043e\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0438\u0433\u0440\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u0432 CocoStudio \u0438\u043b\u0438 Dragonbones. \u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435, \u043a\u0440\u043e\u043c\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 <em>&#171;Armature&#187;:&#187;Crocco&#187;<\/em>, \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0435\u0449\u0435 \u0442\u0438\u043f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 <em>&#171;ArmatureType&#187;:1<\/em>.<\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0435\u0441\u043b\u0438 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \u0442\u0438\u043f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u043d\u0430\u0448 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0432 CocoStudio \u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u0442\u0438\u043f\u043e\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0434 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0443\u0442\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a.<\/p>\n<pre><code class=\"cpp\">if (!setting.armature.empty())   this->_addPathAnimation(PathAnamitionsPersons + setting.armature, setting.armatureType);<\/code><\/pre>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0443\u0442\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 void JCResourcesData::_addPathAnimation(const std::string &amp;pathAnimations, int armatureType) { pathAnimations_.push_back(std::pair&lt;std::string, int>(pathAnimations, armatureType)); }<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u0441\u0435 \u043f\u0443\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0441\u043f\u0438\u0441\u043e\u043a, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>\u0412 \u0438\u0433\u0440\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0443 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043c\u044b \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u043f\u0443\u0442\u044f\u043c\u0438 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432 void JCResourcesData::_loadAnimations() { std::sort(pathAnimations_.begin(), pathAnimations_.end()); pathAnimations_.resize(unique(pathAnimations_.begin(), pathAnimations_.end()) - pathAnimations_.begin());  itPaths_ = pathAnimations_.begin();  if (JCGlobalSetting::getInstance()->isFastLoad()) this->_updateloadAnimations(0); else Director::getInstance()->getScheduler()->schedule(CC_SCHEDULE_SELECTOR(JCResourcesData::_updateloadAnimations), this, 0, false); } <\/code><\/pre>\n<pre><code class=\"cpp\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 void JCResourcesData::_updateloadAnimations(float \/*dt*\/) { if (listener_) { if (pathAnimations_.empty()) listener_(Percent100); else { size_t count = pathAnimations_.size(); size_t cur = itPaths_ - pathAnimations_.begin(); listener_(cur * Percent100 \/ count); } }  if (itPaths_ != pathAnimations_.end()) { if ((*itPaths_).second == JCArmatureEditor::Type::COCOSTUDIO) { if (FileUtils::getInstance()->isFileExist((*itPaths_).first + PrefixCSArmature)) ArmatureDataManager::getInstance()->addArmatureFileInfo((*itPaths_).first + PrefixCSArmature); else this->_loadDefaultAnimation((*itPaths_)); }  if ((*itPaths_).second == JCArmatureEditor::Type::DRAGONBONE)<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-329229","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/329229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=329229"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/329229\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=329229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=329229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=329229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}