From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/Animation/AnimationEvent.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Runtime/Animation/AnimationEvent.h (limited to 'Runtime/Animation/AnimationEvent.h') diff --git a/Runtime/Animation/AnimationEvent.h b/Runtime/Animation/AnimationEvent.h new file mode 100644 index 0000000..541d719 --- /dev/null +++ b/Runtime/Animation/AnimationEvent.h @@ -0,0 +1,29 @@ +#ifndef ANIMATIONEVENT_H +#define ANIMATIONEVENT_H + +#include "Runtime/BaseClasses/GameObject.h" +class AnimationState; + +struct AnimationEvent +{ + DECLARE_SERIALIZE (AnimationEvent) + + float time; + UnityStr functionName; + UnityStr stringParameter; + PPtr objectReferenceParameter; + float floatParameter; + int intParameter; + + int messageOptions; + mutable AnimationState* stateSender; + + AnimationEvent() { messageOptions = 0; stateSender = NULL; floatParameter = 0.0F; intParameter = 0; } + + friend bool operator < (const AnimationEvent& lhs, const AnimationEvent& rhs) { return lhs.time < rhs.time; } +}; + +bool FireEvent (AnimationEvent& event, AnimationState* state, Unity::Component& animation); + + +#endif -- cgit v1.1-26-g67d0