diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Animation/AnimationEvent.h |
Diffstat (limited to 'Runtime/Animation/AnimationEvent.h')
-rw-r--r-- | Runtime/Animation/AnimationEvent.h | 29 |
1 files changed, 29 insertions, 0 deletions
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<Object> 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 |