173 lines
6.0 KiB
C#
173 lines
6.0 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using UnityEngine.Playables;
|
|
using UnityEngine.Scripting;
|
|
|
|
namespace UnityEngine.Animations
|
|
{
|
|
// Token: 0x020001F5 RID: 501
|
|
[RequiredByNativeCode]
|
|
internal struct AnimationOffsetPlayable : IPlayable, IEquatable<AnimationOffsetPlayable>
|
|
{
|
|
// Token: 0x0600230A RID: 8970 RVA: 0x00028C78 File Offset: 0x00026E78
|
|
internal AnimationOffsetPlayable(PlayableHandle handle)
|
|
{
|
|
if (handle.IsValid())
|
|
{
|
|
if (!handle.IsPlayableOfType<AnimationOffsetPlayable>())
|
|
{
|
|
throw new InvalidCastException("Can't set handle: the playable is not an AnimationOffsetPlayable.");
|
|
}
|
|
}
|
|
this.m_Handle = handle;
|
|
}
|
|
|
|
// Token: 0x17000838 RID: 2104
|
|
// (get) Token: 0x0600230B RID: 8971 RVA: 0x00028CA8 File Offset: 0x00026EA8
|
|
public static AnimationOffsetPlayable Null
|
|
{
|
|
get
|
|
{
|
|
return AnimationOffsetPlayable.m_NullPlayable;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600230C RID: 8972 RVA: 0x00028CC4 File Offset: 0x00026EC4
|
|
public static AnimationOffsetPlayable Create(PlayableGraph graph, Vector3 position, Quaternion rotation, int inputCount)
|
|
{
|
|
PlayableHandle playableHandle = AnimationOffsetPlayable.CreateHandle(graph, position, rotation, inputCount);
|
|
return new AnimationOffsetPlayable(playableHandle);
|
|
}
|
|
|
|
// Token: 0x0600230D RID: 8973 RVA: 0x00028CEC File Offset: 0x00026EEC
|
|
private static PlayableHandle CreateHandle(PlayableGraph graph, Vector3 position, Quaternion rotation, int inputCount)
|
|
{
|
|
PlayableHandle @null = PlayableHandle.Null;
|
|
PlayableHandle playableHandle;
|
|
if (!AnimationOffsetPlayable.CreateHandleInternal(graph, position, rotation, ref @null))
|
|
{
|
|
playableHandle = PlayableHandle.Null;
|
|
}
|
|
else
|
|
{
|
|
@null.SetInputCount(inputCount);
|
|
playableHandle = @null;
|
|
}
|
|
return playableHandle;
|
|
}
|
|
|
|
// Token: 0x0600230E RID: 8974 RVA: 0x00028D2C File Offset: 0x00026F2C
|
|
public PlayableHandle GetHandle()
|
|
{
|
|
return this.m_Handle;
|
|
}
|
|
|
|
// Token: 0x0600230F RID: 8975 RVA: 0x00028D48 File Offset: 0x00026F48
|
|
public static implicit operator Playable(AnimationOffsetPlayable playable)
|
|
{
|
|
return new Playable(playable.GetHandle());
|
|
}
|
|
|
|
// Token: 0x06002310 RID: 8976 RVA: 0x00028D6C File Offset: 0x00026F6C
|
|
public static explicit operator AnimationOffsetPlayable(Playable playable)
|
|
{
|
|
return new AnimationOffsetPlayable(playable.GetHandle());
|
|
}
|
|
|
|
// Token: 0x06002311 RID: 8977 RVA: 0x00028D90 File Offset: 0x00026F90
|
|
public bool Equals(AnimationOffsetPlayable other)
|
|
{
|
|
return this.Equals(other.GetHandle());
|
|
}
|
|
|
|
// Token: 0x06002312 RID: 8978 RVA: 0x00028DC0 File Offset: 0x00026FC0
|
|
private static bool CreateHandleInternal(PlayableGraph graph, Vector3 position, Quaternion rotation, ref PlayableHandle handle)
|
|
{
|
|
return AnimationOffsetPlayable.INTERNAL_CALL_CreateHandleInternal(ref graph, ref position, ref rotation, ref handle);
|
|
}
|
|
|
|
// Token: 0x06002313 RID: 8979
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern bool INTERNAL_CALL_CreateHandleInternal(ref PlayableGraph graph, ref Vector3 position, ref Quaternion rotation, ref PlayableHandle handle);
|
|
|
|
// Token: 0x06002314 RID: 8980 RVA: 0x00028DE4 File Offset: 0x00026FE4
|
|
public Vector3 GetPosition()
|
|
{
|
|
return AnimationOffsetPlayable.GetPositionInternal(ref this.m_Handle);
|
|
}
|
|
|
|
// Token: 0x06002315 RID: 8981 RVA: 0x00028E04 File Offset: 0x00027004
|
|
public void SetPosition(Vector3 value)
|
|
{
|
|
AnimationOffsetPlayable.SetPositionInternal(ref this.m_Handle, value);
|
|
}
|
|
|
|
// Token: 0x06002316 RID: 8982 RVA: 0x00028E14 File Offset: 0x00027014
|
|
public Quaternion GetRotation()
|
|
{
|
|
return AnimationOffsetPlayable.GetRotationInternal(ref this.m_Handle);
|
|
}
|
|
|
|
// Token: 0x06002317 RID: 8983 RVA: 0x00028E34 File Offset: 0x00027034
|
|
public void SetRotation(Quaternion value)
|
|
{
|
|
AnimationOffsetPlayable.SetRotationInternal(ref this.m_Handle, value);
|
|
}
|
|
|
|
// Token: 0x06002318 RID: 8984 RVA: 0x00028E44 File Offset: 0x00027044
|
|
private static Vector3 GetPositionInternal(ref PlayableHandle handle)
|
|
{
|
|
Vector3 vector;
|
|
AnimationOffsetPlayable.INTERNAL_CALL_GetPositionInternal(ref handle, out vector);
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x06002319 RID: 8985
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_GetPositionInternal(ref PlayableHandle handle, out Vector3 value);
|
|
|
|
// Token: 0x0600231A RID: 8986 RVA: 0x00028E64 File Offset: 0x00027064
|
|
private static void SetPositionInternal(ref PlayableHandle handle, Vector3 value)
|
|
{
|
|
AnimationOffsetPlayable.INTERNAL_CALL_SetPositionInternal(ref handle, ref value);
|
|
}
|
|
|
|
// Token: 0x0600231B RID: 8987
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_SetPositionInternal(ref PlayableHandle handle, ref Vector3 value);
|
|
|
|
// Token: 0x0600231C RID: 8988 RVA: 0x00028E70 File Offset: 0x00027070
|
|
private static Quaternion GetRotationInternal(ref PlayableHandle handle)
|
|
{
|
|
Quaternion quaternion;
|
|
AnimationOffsetPlayable.INTERNAL_CALL_GetRotationInternal(ref handle, out quaternion);
|
|
return quaternion;
|
|
}
|
|
|
|
// Token: 0x0600231D RID: 8989
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_GetRotationInternal(ref PlayableHandle handle, out Quaternion value);
|
|
|
|
// Token: 0x0600231E RID: 8990 RVA: 0x00028E90 File Offset: 0x00027090
|
|
private static void SetRotationInternal(ref PlayableHandle handle, Quaternion value)
|
|
{
|
|
AnimationOffsetPlayable.INTERNAL_CALL_SetRotationInternal(ref handle, ref value);
|
|
}
|
|
|
|
// Token: 0x0600231F RID: 8991
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_SetRotationInternal(ref PlayableHandle handle, ref Quaternion value);
|
|
|
|
// Token: 0x04000544 RID: 1348
|
|
private PlayableHandle m_Handle;
|
|
|
|
// Token: 0x04000545 RID: 1349
|
|
private static readonly AnimationOffsetPlayable m_NullPlayable = new AnimationOffsetPlayable(PlayableHandle.Null);
|
|
}
|
|
}
|