forked from hunterzonewu/unity-decompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimationClip.cs
More file actions
164 lines (140 loc) · 6.01 KB
/
AnimationClip.cs
File metadata and controls
164 lines (140 loc) · 6.01 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
// Decompiled with JetBrains decompiler
// Type: UnityEngine.AnimationClip
// Assembly: UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: A8FF7A2C-E4EE-4232-AB17-3FCABEC16496
// Assembly location: C:\Users\Blake\sandbox\unity\test-project\Library\UnityAssemblies\UnityEngine.dll
using System;
using System.Runtime.CompilerServices;
namespace UnityEngine
{
/// <summary>
/// <para>Stores keyframe based animations.</para>
/// </summary>
public sealed class AnimationClip : Motion
{
/// <summary>
/// <para>Animation length in seconds. (Read Only)</para>
/// </summary>
public float length { [WrapperlessIcall, MethodImpl(MethodImplOptions.InternalCall)] get; }
internal float startTime { [WrapperlessIcall, MethodImpl(MethodImplOptions.InternalCall)] get; }
internal float stopTime { [WrapperlessIcall, MethodImpl(MethodImplOptions.InternalCall)] get; }
/// <summary>
/// <para>Frame rate at which keyframes are sampled. (Read Only)</para>
/// </summary>
public float frameRate { [WrapperlessIcall, MethodImpl(MethodImplOptions.InternalCall)] get; [WrapperlessIcall, MethodImpl(MethodImplOptions.InternalCall)] set; }
/// <summary>
/// <para>Sets the default wrap mode used in the animation state.</para>
/// </summary>
public WrapMode wrapMode { [WrapperlessIcall, MethodImpl(MethodImplOptions.InternalCall)] get; [WrapperlessIcall, MethodImpl(MethodImplOptions.InternalCall)] set; }
/// <summary>
/// <para>AABB of this Animation Clip in local space of Animation component that it is attached too.</para>
/// </summary>
public Bounds localBounds
{
get
{
Bounds bounds;
this.INTERNAL_get_localBounds(out bounds);
return bounds;
}
set
{
this.INTERNAL_set_localBounds(ref value);
}
}
/// <summary>
/// <para>Set to true if the AnimationClip will be used with the Legacy Animation component ( instead of the Animator ).</para>
/// </summary>
public new bool legacy { [WrapperlessIcall, MethodImpl(MethodImplOptions.InternalCall)] get; [WrapperlessIcall, MethodImpl(MethodImplOptions.InternalCall)] set; }
/// <summary>
/// <para>Returns true if the animation contains curve that drives a humanoid rig.</para>
/// </summary>
public bool humanMotion { [WrapperlessIcall, MethodImpl(MethodImplOptions.InternalCall)] get; }
/// <summary>
/// <para>Animation Events for this animation clip.</para>
/// </summary>
public AnimationEvent[] events
{
get
{
return (AnimationEvent[]) this.GetEventsInternal();
}
set
{
this.SetEventsInternal((Array) value);
}
}
/// <summary>
/// <para>Creates a new animation clip.</para>
/// </summary>
public AnimationClip()
{
AnimationClip.Internal_CreateAnimationClip(this);
}
/// <summary>
/// <para>Samples an animation at a given time for any animated properties.</para>
/// </summary>
/// <param name="go">The animated game object.</param>
/// <param name="time">The time to sample an animation.</param>
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
public void SampleAnimation(GameObject go, float time);
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_CreateAnimationClip([Writable] AnimationClip self);
/// <summary>
/// <para>Assigns the curve to animate a specific property.</para>
/// </summary>
/// <param name="relativePath">Path to the game object this curve applies to. relativePath is formatted similar to a pathname, e.g. "rootspineleftArm".
/// If relativePath is empty it refers to the game object the animation clip is attached to.</param>
/// <param name="type">The class type of the component that is animated.</param>
/// <param name="propertyName">The name or path to the property being animated.</param>
/// <param name="curve">The animation curve.</param>
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
public void SetCurve(string relativePath, System.Type type, string propertyName, AnimationCurve curve);
/// <summary>
/// <para>In order to insure better interpolation of quaternions, call this function after you are finished setting animation curves.</para>
/// </summary>
public void EnsureQuaternionContinuity()
{
AnimationClip.INTERNAL_CALL_EnsureQuaternionContinuity(this);
}
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void INTERNAL_CALL_EnsureQuaternionContinuity(AnimationClip self);
/// <summary>
/// <para>Clears all curves from the clip.</para>
/// </summary>
public void ClearCurves()
{
AnimationClip.INTERNAL_CALL_ClearCurves(this);
}
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void INTERNAL_CALL_ClearCurves(AnimationClip self);
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
private void INTERNAL_get_localBounds(out Bounds value);
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
private void INTERNAL_set_localBounds(ref Bounds value);
/// <summary>
/// <para>Adds an animation event to the clip.</para>
/// </summary>
/// <param name="evt">AnimationEvent to add.</param>
public void AddEvent(AnimationEvent evt)
{
this.AddEventInternal((object) evt);
}
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
internal void AddEventInternal(object evt);
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
internal void SetEventsInternal(Array value);
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
internal Array GetEventsInternal();
}
}