scripts
This commit is contained in:
@@ -0,0 +1,266 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace UnityEngine
|
||||
{
|
||||
// Token: 0x02000086 RID: 134
|
||||
[UsedByNativeCode]
|
||||
public struct Bounds
|
||||
{
|
||||
// Token: 0x060009C5 RID: 2501 RVA: 0x0000E540 File Offset: 0x0000C740
|
||||
public Bounds(Vector3 center, Vector3 size)
|
||||
{
|
||||
this.m_Center = center;
|
||||
this.m_Extents = size * 0.5f;
|
||||
}
|
||||
|
||||
// Token: 0x060009C6 RID: 2502 RVA: 0x0000E55C File Offset: 0x0000C75C
|
||||
[ThreadAndSerializationSafe]
|
||||
private static bool Internal_Contains(Bounds m, Vector3 point)
|
||||
{
|
||||
return Bounds.INTERNAL_CALL_Internal_Contains(ref m, ref point);
|
||||
}
|
||||
|
||||
// Token: 0x060009C7 RID: 2503
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern bool INTERNAL_CALL_Internal_Contains(ref Bounds m, ref Vector3 point);
|
||||
|
||||
// Token: 0x060009C8 RID: 2504 RVA: 0x0000E57C File Offset: 0x0000C77C
|
||||
public bool Contains(Vector3 point)
|
||||
{
|
||||
return Bounds.Internal_Contains(this, point);
|
||||
}
|
||||
|
||||
// Token: 0x060009C9 RID: 2505 RVA: 0x0000E5A0 File Offset: 0x0000C7A0
|
||||
private static float Internal_SqrDistance(Bounds m, Vector3 point)
|
||||
{
|
||||
return Bounds.INTERNAL_CALL_Internal_SqrDistance(ref m, ref point);
|
||||
}
|
||||
|
||||
// Token: 0x060009CA RID: 2506
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern float INTERNAL_CALL_Internal_SqrDistance(ref Bounds m, ref Vector3 point);
|
||||
|
||||
// Token: 0x060009CB RID: 2507 RVA: 0x0000E5C0 File Offset: 0x0000C7C0
|
||||
public float SqrDistance(Vector3 point)
|
||||
{
|
||||
return Bounds.Internal_SqrDistance(this, point);
|
||||
}
|
||||
|
||||
// Token: 0x060009CC RID: 2508 RVA: 0x0000E5E4 File Offset: 0x0000C7E4
|
||||
private static bool Internal_IntersectRay(ref Ray ray, ref Bounds bounds, out float distance)
|
||||
{
|
||||
return Bounds.INTERNAL_CALL_Internal_IntersectRay(ref ray, ref bounds, out distance);
|
||||
}
|
||||
|
||||
// Token: 0x060009CD RID: 2509
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern bool INTERNAL_CALL_Internal_IntersectRay(ref Ray ray, ref Bounds bounds, out float distance);
|
||||
|
||||
// Token: 0x060009CE RID: 2510 RVA: 0x0000E604 File Offset: 0x0000C804
|
||||
public bool IntersectRay(Ray ray)
|
||||
{
|
||||
float num;
|
||||
return Bounds.Internal_IntersectRay(ref ray, ref this, out num);
|
||||
}
|
||||
|
||||
// Token: 0x060009CF RID: 2511 RVA: 0x0000E624 File Offset: 0x0000C824
|
||||
public bool IntersectRay(Ray ray, out float distance)
|
||||
{
|
||||
return Bounds.Internal_IntersectRay(ref ray, ref this, out distance);
|
||||
}
|
||||
|
||||
// Token: 0x060009D0 RID: 2512 RVA: 0x0000E644 File Offset: 0x0000C844
|
||||
private static Vector3 Internal_GetClosestPoint(ref Bounds bounds, ref Vector3 point)
|
||||
{
|
||||
Vector3 vector;
|
||||
Bounds.INTERNAL_CALL_Internal_GetClosestPoint(ref bounds, ref point, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
// Token: 0x060009D1 RID: 2513
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void INTERNAL_CALL_Internal_GetClosestPoint(ref Bounds bounds, ref Vector3 point, out Vector3 value);
|
||||
|
||||
// Token: 0x060009D2 RID: 2514 RVA: 0x0000E664 File Offset: 0x0000C864
|
||||
public Vector3 ClosestPoint(Vector3 point)
|
||||
{
|
||||
return Bounds.Internal_GetClosestPoint(ref this, ref point);
|
||||
}
|
||||
|
||||
// Token: 0x060009D3 RID: 2515 RVA: 0x0000E684 File Offset: 0x0000C884
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.center.GetHashCode() ^ (this.extents.GetHashCode() << 2);
|
||||
}
|
||||
|
||||
// Token: 0x060009D4 RID: 2516 RVA: 0x0000E6C4 File Offset: 0x0000C8C4
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
bool flag;
|
||||
if (!(other is Bounds))
|
||||
{
|
||||
flag = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Bounds bounds = (Bounds)other;
|
||||
flag = this.center.Equals(bounds.center) && this.extents.Equals(bounds.extents);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
// Token: 0x1700024C RID: 588
|
||||
// (get) Token: 0x060009D5 RID: 2517 RVA: 0x0000E73C File Offset: 0x0000C93C
|
||||
// (set) Token: 0x060009D6 RID: 2518 RVA: 0x0000E758 File Offset: 0x0000C958
|
||||
public Vector3 center
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Center;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_Center = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700024D RID: 589
|
||||
// (get) Token: 0x060009D7 RID: 2519 RVA: 0x0000E764 File Offset: 0x0000C964
|
||||
// (set) Token: 0x060009D8 RID: 2520 RVA: 0x0000E78C File Offset: 0x0000C98C
|
||||
public Vector3 size
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Extents * 2f;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_Extents = value * 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700024E RID: 590
|
||||
// (get) Token: 0x060009D9 RID: 2521 RVA: 0x0000E7A0 File Offset: 0x0000C9A0
|
||||
// (set) Token: 0x060009DA RID: 2522 RVA: 0x0000E7BC File Offset: 0x0000C9BC
|
||||
public Vector3 extents
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Extents;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_Extents = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700024F RID: 591
|
||||
// (get) Token: 0x060009DB RID: 2523 RVA: 0x0000E7C8 File Offset: 0x0000C9C8
|
||||
// (set) Token: 0x060009DC RID: 2524 RVA: 0x0000E7F0 File Offset: 0x0000C9F0
|
||||
public Vector3 min
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.center - this.extents;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.SetMinMax(value, this.max);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000250 RID: 592
|
||||
// (get) Token: 0x060009DD RID: 2525 RVA: 0x0000E800 File Offset: 0x0000CA00
|
||||
// (set) Token: 0x060009DE RID: 2526 RVA: 0x0000E828 File Offset: 0x0000CA28
|
||||
public Vector3 max
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.center + this.extents;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.SetMinMax(this.min, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060009DF RID: 2527 RVA: 0x0000E838 File Offset: 0x0000CA38
|
||||
public static bool operator ==(Bounds lhs, Bounds rhs)
|
||||
{
|
||||
return lhs.center == rhs.center && lhs.extents == rhs.extents;
|
||||
}
|
||||
|
||||
// Token: 0x060009E0 RID: 2528 RVA: 0x0000E87C File Offset: 0x0000CA7C
|
||||
public static bool operator !=(Bounds lhs, Bounds rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
// Token: 0x060009E1 RID: 2529 RVA: 0x0000E89C File Offset: 0x0000CA9C
|
||||
public void SetMinMax(Vector3 min, Vector3 max)
|
||||
{
|
||||
this.extents = (max - min) * 0.5f;
|
||||
this.center = min + this.extents;
|
||||
}
|
||||
|
||||
// Token: 0x060009E2 RID: 2530 RVA: 0x0000E8C8 File Offset: 0x0000CAC8
|
||||
public void Encapsulate(Vector3 point)
|
||||
{
|
||||
this.SetMinMax(Vector3.Min(this.min, point), Vector3.Max(this.max, point));
|
||||
}
|
||||
|
||||
// Token: 0x060009E3 RID: 2531 RVA: 0x0000E8EC File Offset: 0x0000CAEC
|
||||
public void Encapsulate(Bounds bounds)
|
||||
{
|
||||
this.Encapsulate(bounds.center - bounds.extents);
|
||||
this.Encapsulate(bounds.center + bounds.extents);
|
||||
}
|
||||
|
||||
// Token: 0x060009E4 RID: 2532 RVA: 0x0000E924 File Offset: 0x0000CB24
|
||||
public void Expand(float amount)
|
||||
{
|
||||
amount *= 0.5f;
|
||||
this.extents += new Vector3(amount, amount, amount);
|
||||
}
|
||||
|
||||
// Token: 0x060009E5 RID: 2533 RVA: 0x0000E94C File Offset: 0x0000CB4C
|
||||
public void Expand(Vector3 amount)
|
||||
{
|
||||
this.extents += amount * 0.5f;
|
||||
}
|
||||
|
||||
// Token: 0x060009E6 RID: 2534 RVA: 0x0000E96C File Offset: 0x0000CB6C
|
||||
public bool Intersects(Bounds bounds)
|
||||
{
|
||||
return this.min.x <= bounds.max.x && this.max.x >= bounds.min.x && this.min.y <= bounds.max.y && this.max.y >= bounds.min.y && this.min.z <= bounds.max.z && this.max.z >= bounds.min.z;
|
||||
}
|
||||
|
||||
// Token: 0x060009E7 RID: 2535 RVA: 0x0000EA5C File Offset: 0x0000CC5C
|
||||
public override string ToString()
|
||||
{
|
||||
return UnityString.Format("Center: {0}, Extents: {1}", new object[] { this.m_Center, this.m_Extents });
|
||||
}
|
||||
|
||||
// Token: 0x060009E8 RID: 2536 RVA: 0x0000EAA0 File Offset: 0x0000CCA0
|
||||
public string ToString(string format)
|
||||
{
|
||||
return UnityString.Format("Center: {0}, Extents: {1}", new object[]
|
||||
{
|
||||
this.m_Center.ToString(format),
|
||||
this.m_Extents.ToString(format)
|
||||
});
|
||||
}
|
||||
|
||||
// Token: 0x040000F7 RID: 247
|
||||
private Vector3 m_Center;
|
||||
|
||||
// Token: 0x040000F8 RID: 248
|
||||
private Vector3 m_Extents;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user