forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAnimationEvent.cs
More file actions
169 lines (169 loc) · 3.11 KB
/
AnimationEvent.cs
File metadata and controls
169 lines (169 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
using System;
using System.Runtime.InteropServices;
namespace UnityEngine
{
[Serializable]
[StructLayout(LayoutKind.Sequential)]
public sealed class AnimationEvent
{
internal float m_Time;
internal string m_FunctionName;
internal string m_StringParameter;
internal Object m_ObjectReferenceParameter;
internal float m_FloatParameter;
internal int m_IntParameter;
internal int m_MessageOptions;
internal AnimationEventSource m_Source;
internal AnimationState m_StateSender;
internal AnimatorStateInfo m_AnimatorStateInfo;
internal AnimatorClipInfo m_AnimatorClipInfo;
[Obsolete("Use stringParameter instead")]
public string data
{
get
{
return this.m_StringParameter;
}
set
{
this.m_StringParameter = value;
}
}
public string stringParameter
{
get
{
return this.m_StringParameter;
}
set
{
this.m_StringParameter = value;
}
}
public float floatParameter
{
get
{
return this.m_FloatParameter;
}
set
{
this.m_FloatParameter = value;
}
}
public int intParameter
{
get
{
return this.m_IntParameter;
}
set
{
this.m_IntParameter = value;
}
}
public Object objectReferenceParameter
{
get
{
return this.m_ObjectReferenceParameter;
}
set
{
this.m_ObjectReferenceParameter = value;
}
}
public string functionName
{
get
{
return this.m_FunctionName;
}
set
{
this.m_FunctionName = value;
}
}
public float time
{
get
{
return this.m_Time;
}
set
{
this.m_Time = value;
}
}
public SendMessageOptions messageOptions
{
get
{
return (SendMessageOptions)this.m_MessageOptions;
}
set
{
this.m_MessageOptions = (int)value;
}
}
public bool isFiredByLegacy
{
get
{
return this.m_Source == AnimationEventSource.Legacy;
}
}
public bool isFiredByAnimator
{
get
{
return this.m_Source == AnimationEventSource.Animator;
}
}
public AnimationState animationState
{
get
{
if (!this.isFiredByLegacy)
{
Debug.LogError("AnimationEvent was not fired by Animation component, you shouldn't use AnimationEvent.animationState");
}
return this.m_StateSender;
}
}
public AnimatorStateInfo animatorStateInfo
{
get
{
if (!this.isFiredByAnimator)
{
Debug.LogError("AnimationEvent was not fired by Animator component, you shouldn't use AnimationEvent.animatorStateInfo");
}
return this.m_AnimatorStateInfo;
}
}
public AnimatorClipInfo animatorClipInfo
{
get
{
if (!this.isFiredByAnimator)
{
Debug.LogError("AnimationEvent was not fired by Animator component, you shouldn't use AnimationEvent.animatorClipInfo");
}
return this.m_AnimatorClipInfo;
}
}
public AnimationEvent()
{
this.m_Time = 0f;
this.m_FunctionName = string.Empty;
this.m_StringParameter = string.Empty;
this.m_ObjectReferenceParameter = null;
this.m_FloatParameter = 0f;
this.m_IntParameter = 0;
this.m_MessageOptions = 0;
this.m_Source = AnimationEventSource.NoSource;
this.m_StateSender = null;
}
}
}