summaryrefslogtreecommitdiff
path: root/Runtime/Animation/AnimationEvent.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/Animation/AnimationEvent.h')
-rw-r--r--Runtime/Animation/AnimationEvent.h29
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