mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Almost Done!
This commit is contained in:
parent
517c48a2d5
commit
52e04508f6
@ -45,12 +45,14 @@ namespace Spine
|
|||||||
public:
|
public:
|
||||||
EventTimeline(int frameCount);
|
EventTimeline(int frameCount);
|
||||||
|
|
||||||
|
~EventTimeline();
|
||||||
|
|
||||||
virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
|
virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
|
||||||
|
|
||||||
virtual int getPropertyId();
|
virtual int getPropertyId();
|
||||||
|
|
||||||
/// Sets the time and value of the specified keyframe.
|
/// Sets the time and value of the specified keyframe.
|
||||||
void setFrame(int frameIndex, Event* e);
|
void setFrame(int frameIndex, Event* event);
|
||||||
|
|
||||||
Vector<float> getFrames();
|
Vector<float> getFrames();
|
||||||
void setFrames(Vector<float>& inValue);
|
void setFrames(Vector<float>& inValue);
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
#include <spine/Slot.h>
|
#include <spine/Slot.h>
|
||||||
#include <spine/SlotData.h>
|
#include <spine/SlotData.h>
|
||||||
#include <spine/Event.h>
|
#include <spine/Event.h>
|
||||||
|
#include <spine/ContainerUtil.h>
|
||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
@ -49,6 +50,11 @@ namespace Spine
|
|||||||
_events.reserve(frameCount);
|
_events.reserve(frameCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EventTimeline::~EventTimeline()
|
||||||
|
{
|
||||||
|
ContainerUtil::cleanUpVectorOfPointers(_events);
|
||||||
|
}
|
||||||
|
|
||||||
void EventTimeline::apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction)
|
void EventTimeline::apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction)
|
||||||
{
|
{
|
||||||
if (pEvents == NULL)
|
if (pEvents == NULL)
|
||||||
@ -112,10 +118,10 @@ namespace Spine
|
|||||||
return ((int)TimelineType_Event << 24);
|
return ((int)TimelineType_Event << 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventTimeline::setFrame(int frameIndex, Event* e)
|
void EventTimeline::setFrame(int frameIndex, Event* event)
|
||||||
{
|
{
|
||||||
_frames[frameIndex] = e->getTime();
|
_frames[frameIndex] = event->getTime();
|
||||||
_events[frameIndex] = e;
|
_events[frameIndex] = event;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<float> EventTimeline::getFrames() { return _frames; }
|
Vector<float> EventTimeline::getFrames() { return _frames; }
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user