資源簡介
cocos2dx升級spine3.8。解決多個相同動畫同時加載卡頓的問題,自測可用,200個相同動畫瞬間加載完成,不卡幀

代碼片段和文件信息
/******************************************************************************
?*?Spine?Runtimes?License?Agreement
?*?Last?updated?January?1?2020.?Replaces?all?prior?versions.
?*
?*?Copyright?(c)?2013-2020?Esoteric?Software?LLC
?*
?*?Integration?of?the?Spine?Runtimes?into?software?or?otherwise?creating
?*?derivative?works?of?the?Spine?Runtimes?is?permitted?under?the?terms?and
?*?conditions?of?Section?2?of?the?Spine?Editor?License?Agreement:
?*?http://esotericsoftware.com/spine-editor-license
?*
?*?Otherwise?it?is?permitted?to?integrate?the?Spine?Runtimes?into?software
?*?or?otherwise?create?derivative?works?of?the?Spine?Runtimes?(collectively
?*?“Products“)?provided?that?each?user?of?the?Products?must?obtain?their?own
?*?Spine?Editor?license?and?redistribution?of?the?Products?in?any?form?must
?*?include?this?license?and?copyright?notice.
?*
?*?THE?SPINE?RUNTIMES?ARE?PROVIDED?BY?ESOTERIC?SOFTWARE?LLC?“AS?IS“?AND?ANY
?*?EXPRESS?OR?IMPLIED?WARRANTIES?INCLUDING?BUT?NOT?LIMITED?TO?THE?IMPLIED
?*?WARRANTIES?OF?MERCHANTABILITY?AND?FITNESS?FOR?A?PARTICULAR?PURPOSE?ARE
?*?DISCLAIMED.?IN?NO?EVENT?SHALL?ESOTERIC?SOFTWARE?LLC?BE?LIABLE?FOR?ANY
?*?DIRECT?INDIRECT?INCIDENTAL?SPECIAL?EXEMPLARY?OR?CONSEQUENTIAL?DAMAGES
?*?(INCLUDING?BUT?NOT?LIMITED?TO?PROCUREMENT?OF?SUBSTITUTE?GOODS?OR?SERVICES
?*?BUSINESS?INTERRUPTION?OR?LOSS?OF?USE?DATA?OR?PROFITS)?HOWEVER?CAUSED?AND
?*?ON?ANY?THEORY?OF?LIABILITY?WHETHER?IN?CONTRACT?STRICT?LIABILITY?OR?TORT
?*?(INCLUDING?NEGLIGENCE?OR?OTHERWISE)?ARISING?IN?ANY?WAY?OUT?OF?THE?USE?OF
?*?THE?SPINE?RUNTIMES?EVEN?IF?ADVISED?OF?THE?POSSIBILITY?OF?SUCH?DAMAGE.
?*****************************************************************************/
#ifdef?SPINE_UE4
#include?“SpinePluginPrivatePCH.h“
#endif
#include?
#include?
#include?
#include?
#include?
#include?
using?namespace?spine;
Animation::Animation(const?String?&name?Vector?&timelines?float?duration)?:
_timelines(timelines)
_timelineIds()
_duration(duration)
_name(name)?{
assert(_name.length()?>?0);
for?(int?i?=?0;?i?(int)timelines.size();?i++)
_timelineIds.put(timelines[i]->getPropertyId()?true);
}
bool?Animation::hasTimeline(int?id)?{
return?_timelineIds.containsKey(id);
}
Animation::~Animation()?{
ContainerUtil::cleanUpVectorOfPointers(_timelines);
}
void?Animation::apply(Skeleton?&skeleton?float?lastTime?float?time?bool?loop?Vector?*pEvents?float?alpha
MixBlend?blend?MixDirection?direction
)?{
if?(loop?&&?_duration?!=?0)?{
time?=?MathUtil::fmod(time?_duration);
if?(lastTime?>?0)?{
lastTime?=?MathUtil::fmod(lastTime?_duration);
}
}
for?(size_t?i?=?0?n?=?_timelines.size();?i? _timelines[i]->apply(skeleton?lastTime?time?pEvents?alpha?blend?direction);
}
}
const?String?&Animation::getName()?{
return?_name;
}
Vector?&Animation::getTimelines()?{
retur
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4252??2020-05-07?21:10??spine\Animation.cpp
?????文件???????3766??2020-05-11?10:56??spine\Animation.h
?????文件??????34598??2020-06-23?10:53??spine\AnimationState.cpp
?????文件??????19681??2020-06-18?14:36??spine\AnimationState.h
?????文件???????3191??2020-05-07?21:10??spine\AnimationStateData.cpp
?????文件???????3366??2020-05-07?21:10??spine\AnimationStateData.h
?????文件??????10021??2020-05-07?21:10??spine\Atlas.cpp
?????文件???????4874??2020-05-11?10:58??spine\Atlas.h
?????文件???????4944??2020-05-07?21:10??spine\AtlasAttachmentLoader.cpp
?????文件???????3020??2020-05-07?21:10??spine\AtlasAttachmentLoader.h
?????文件???????2222??2020-05-07?21:10??spine\Attachment.cpp
?????文件???????2251??2020-06-18?10:28??spine\Attachment.h
?????文件???????2191??2020-05-07?21:10??spine\AttachmentLoader.cpp
?????文件???????3077??2020-05-07?21:10??spine\AttachmentLoader.h
?????文件???????4365??2020-05-07?21:10??spine\AttachmentTimeline.cpp
?????文件???????2899??2020-05-07?21:10??spine\AttachmentTimeline.h
?????文件???????2032??2020-05-07?21:10??spine\AttachmentType.h
?????文件???????2372??2020-05-07?21:10??spine\AttachmentVertices.cpp
?????文件???????2183??2020-05-07?21:10??spine\AttachmentVertices.h
?????文件???????1913??2020-05-07?21:10??spine\BlendMode.h
?????文件??????12683??2020-05-07?21:10??spine\Bone.cpp
?????文件???????6555??2020-06-18?10:24??spine\Bone.h
?????文件???????3518??2020-05-07?21:10??spine\BoneData.cpp
?????文件???????3461??2020-06-18?10:23??spine\BoneData.h
?????文件???????2143??2020-05-07?21:10??spine\BoundingBoxAttachment.cpp
?????文件???????2136??2020-05-07?21:10??spine\BoundingBoxAttachment.h
?????文件???????2342??2020-05-07?21:10??spine\ClippingAttachment.cpp
?????文件???????2254??2020-05-07?21:10??spine\ClippingAttachment.h
?????文件???????2832??2020-06-18?11:46??spine\Color.h
?????文件???????4937??2020-05-07?21:10??spine\ColorTimeline.cpp
............此處省略217個文件信息
- 上一篇:最新考研數學知識點總結
- 下一篇:SAR影像艦船目標檢測
評論
共有 條評論