Added player character and step in/out of dialogue in scene 101
This commit is contained in:
Vendored
+69
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.ProBuilder.KdTree.Math
|
||||
{
|
||||
[Serializable]
|
||||
class DoubleMath : TypeMath<double>
|
||||
{
|
||||
public override int Compare(double a, double b)
|
||||
{
|
||||
return a.CompareTo(b);
|
||||
}
|
||||
|
||||
public override bool AreEqual(double a, double b)
|
||||
{
|
||||
return a == b;
|
||||
}
|
||||
|
||||
public override double MinValue
|
||||
{
|
||||
get { return double.MinValue; }
|
||||
}
|
||||
|
||||
public override double MaxValue
|
||||
{
|
||||
get { return double.MaxValue; }
|
||||
}
|
||||
|
||||
public override double Zero
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public override double NegativeInfinity { get { return double.NegativeInfinity; } }
|
||||
|
||||
public override double PositiveInfinity { get { return double.PositiveInfinity; } }
|
||||
|
||||
public override double Add(double a, double b)
|
||||
{
|
||||
return a + b;
|
||||
}
|
||||
|
||||
public override double Subtract(double a, double b)
|
||||
{
|
||||
return a - b;
|
||||
}
|
||||
|
||||
public override double Multiply(double a, double b)
|
||||
{
|
||||
return a * b;
|
||||
}
|
||||
|
||||
public override double DistanceSquaredBetweenPoints(double[] a, double[] b)
|
||||
{
|
||||
double distance = Zero;
|
||||
int dimensions = a.Length;
|
||||
|
||||
// Return the absolute distance bewteen 2 hyper points
|
||||
for (var dimension = 0; dimension < dimensions; dimension++)
|
||||
{
|
||||
double distOnThisAxis = Subtract(a[dimension], b[dimension]);
|
||||
double distOnThisAxisSquared = Multiply(distOnThisAxis, distOnThisAxis);
|
||||
|
||||
distance = Add(distance, distOnThisAxisSquared);
|
||||
}
|
||||
|
||||
return distance;
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2c22c8685df2d44b943673a11597711
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.ProBuilder.KdTree.Math
|
||||
{
|
||||
[Serializable]
|
||||
class FloatMath : TypeMath<float>
|
||||
{
|
||||
public override int Compare(float a, float b)
|
||||
{
|
||||
return a.CompareTo(b);
|
||||
}
|
||||
|
||||
public override bool AreEqual(float a, float b)
|
||||
{
|
||||
return a == b;
|
||||
}
|
||||
|
||||
public override float MinValue
|
||||
{
|
||||
get { return float.MinValue; }
|
||||
}
|
||||
|
||||
public override float MaxValue
|
||||
{
|
||||
get { return float.MaxValue; }
|
||||
}
|
||||
|
||||
public override float Zero
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public override float NegativeInfinity { get { return float.NegativeInfinity; } }
|
||||
|
||||
public override float PositiveInfinity { get { return float.PositiveInfinity; } }
|
||||
|
||||
public override float Add(float a, float b)
|
||||
{
|
||||
return a + b;
|
||||
}
|
||||
|
||||
public override float Subtract(float a, float b)
|
||||
{
|
||||
return a - b;
|
||||
}
|
||||
|
||||
public override float Multiply(float a, float b)
|
||||
{
|
||||
return a * b;
|
||||
}
|
||||
|
||||
public override float DistanceSquaredBetweenPoints(float[] a, float[] b)
|
||||
{
|
||||
float distance = Zero;
|
||||
int dimensions = a.Length;
|
||||
|
||||
// Return the absolute distance bewteen 2 hyper points
|
||||
for (var dimension = 0; dimension < dimensions; dimension++)
|
||||
{
|
||||
float distOnThisAxis = Subtract(a[dimension], b[dimension]);
|
||||
float distOnThisAxisSquared = Multiply(distOnThisAxis, distOnThisAxis);
|
||||
|
||||
distance = Add(distance, distOnThisAxisSquared);
|
||||
}
|
||||
|
||||
return distance;
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 483554fdb1324da4ead26f33de2c9990
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
namespace UnityEngine.ProBuilder.KdTree
|
||||
{
|
||||
interface ITypeMath<T>
|
||||
{
|
||||
int Compare(T a, T b);
|
||||
|
||||
T MinValue { get; }
|
||||
|
||||
T MaxValue { get; }
|
||||
|
||||
T Min(T a, T b);
|
||||
|
||||
T Max(T a, T b);
|
||||
|
||||
bool AreEqual(T a, T b);
|
||||
|
||||
bool AreEqual(T[] a, T[] b);
|
||||
|
||||
T Add(T a, T b);
|
||||
|
||||
T Subtract(T a, T b);
|
||||
|
||||
T Multiply(T a, T b);
|
||||
|
||||
T Zero { get; }
|
||||
|
||||
T NegativeInfinity { get; }
|
||||
|
||||
T PositiveInfinity { get; }
|
||||
|
||||
T DistanceSquaredBetweenPoints(T[] a, T[] b);
|
||||
}
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2799d938bc097b0478b150b315487a18
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.ProBuilder.KdTree.Math
|
||||
{
|
||||
[Serializable]
|
||||
abstract class TypeMath<T> : ITypeMath<T>
|
||||
{
|
||||
#region ITypeMath<T> members
|
||||
|
||||
public abstract int Compare(T a, T b);
|
||||
|
||||
public abstract bool AreEqual(T a, T b);
|
||||
|
||||
public virtual bool AreEqual(T[] a, T[] b)
|
||||
{
|
||||
if (a.Length != b.Length)
|
||||
return false;
|
||||
|
||||
for (var index = 0; index < a.Length; index++)
|
||||
{
|
||||
if (!AreEqual(a[index], b[index]))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public abstract T MinValue { get; }
|
||||
|
||||
public abstract T MaxValue { get; }
|
||||
|
||||
public T Min(T a, T b)
|
||||
{
|
||||
if (Compare(a, b) < 0)
|
||||
return a;
|
||||
else
|
||||
return b;
|
||||
}
|
||||
|
||||
public T Max(T a, T b)
|
||||
{
|
||||
if (Compare(a, b) > 0)
|
||||
return a;
|
||||
else
|
||||
return b;
|
||||
}
|
||||
|
||||
public abstract T Zero { get; }
|
||||
|
||||
public abstract T NegativeInfinity { get; }
|
||||
|
||||
public abstract T PositiveInfinity { get; }
|
||||
|
||||
public abstract T Add(T a, T b);
|
||||
|
||||
public abstract T Subtract(T a, T b);
|
||||
|
||||
public abstract T Multiply(T a, T b);
|
||||
|
||||
public abstract T DistanceSquaredBetweenPoints(T[] a, T[] b);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4daa0ba8c6e93d54a9b542d76b235c55
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user