Files
Magical-Jumping-Bean/Library/metadata/77/77476292f9fa4905a787e6417853846b
T

231 lines
12 KiB
Plaintext
Raw Normal View History

2019-09-29 19:40:54 -04:00
í/`2019.2.3f1þÿÿÿÿÿ’3$øÌuñ옲e+ Í=^7€ÿÿÿÿ€¦€²€Ѐ¦€¦€¦€#¦€+H€3ÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€ Q€j€
H€<ÿÿÿÿ €1€1€ÿÿÿÿ @Þ€€
Q€j€Õ€Iÿÿÿÿ€1€1€ÿÿÿÿÀÞ€€H€j€ÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€™€PAssetMetaDataguiddata[0]data[1]data[2]data[3]pathNameoriginalNamelabelsassetStoreRef ÿÿfš†!ë5˜9Ý4QÁóBí7€ÿÿÿÿ€¦€²€
E€ Þ€#€.€,€5a€ Þ€#€.€,€†€r€ Þ€# €.€,
€H€«€ÿÿÿÿ €1€1€ÿÿÿÿ @Þ€€
Q€j€ñ€JÿÿÿÿÀ1€1€ÿÿÿÿ€Þ€€€j€ÿÿÿÿ€\›€ÿÿÿÿ€H€rÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€H€wÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€H€€ÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€y€
€ Þ€#!€.€,"€€…ÿÿÿÿ#@1€1€ÿÿÿÿ$Þ€€%.€j€&Õ€“ÿÿÿÿ'€1€1€ÿÿÿÿ(ÀÞ€€)€j€ÿÿÿÿ*€H€›€ÿÿÿÿ+€1€1€ÿÿÿÿ,@Þ€€-Q€j€.y€
€ /Þ€#0€.€,1€ €§2@¾€¶ 3@Þ€#4€.€,5€H€»ÿÿÿÿ6€1€1€ÿÿÿÿ7@Þ€€8Q€j€9H€Æÿÿÿÿ:€1€1€ÿÿÿÿ;@Þ€€<Q€j€=H€Øÿÿÿÿ>€1€1€ÿÿÿÿ?@Þ€€@Q€j€AMonoImporterPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_ExternalObjectsSourceAssetIdentifiertypeassemblynamem_UsedFileIDsm_DefaultReferencesexecutionOrdericonm_UserDatam_AssetBundleNamem_AssetBundleVariantsÿÿ£Gñ×Ü�Z56 :!@iÁJ*�€7€ÿÿÿÿ€¦€²€E€ Þ€€.€€(a€ Þ€€.€€†€r€ Þ€ €.€
€H€«€ÿÿÿÿ €1€1€ÿÿÿÿ @Þ€€
Q€j€H€ê€ÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€ñ€=ÿÿÿÿ€1€1€ÿÿÿÿ€Þ€€€j€ÿÿÿÿ€H€›€ÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€y€
€ Þ€€.€€y€Q Þ€€.€ €Þ€X!H€iÿÿÿÿ"€1€1€ÿÿÿÿ#@Þ€€$Q€j€%H€uÿÿÿÿ&€1€1€ÿÿÿÿ'@Þ€€(Q€j€)PPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_DefaultReferencesm_Iconm_ExecutionOrderm_ClassNamem_Namespacepp\ày¯Ð€wt&)Ÿ¯”Pzxn‡5H¶HPackages/com.unity.textmeshpro/Scripts/Runtime/TMPro_ExtensionMethods.csày¯TMPro_ExtensionMethodsüusing UnityEngine;
using System.Text;
using System.Collections;
using System.Collections.Generic;
namespace TMPro
{
public static class TMPro_ExtensionMethods
{
public static string ArrayToString(this char[] chars)
{
string s = string.Empty;
for (int i = 0; i < chars.Length && chars[i] != 0; i++)
{
s += chars[i];
}
return s;
}
public static string IntToString(this int[] unicodes)
{
char[] chars = new char[unicodes.Length];
for (int i = 0; i < unicodes.Length; i++)
{
chars[i] = (char)unicodes[i];
}
return new string(chars);
}
public static string IntToString(this int[] unicodes, int start, int length)
{
if (start > unicodes.Length)
return string.Empty;
int end = Mathf.Min(start + length, unicodes.Length);
char[] chars = new char[end - start];
int writeIndex = 0;
for (int i = start; i < end; i++)
{
chars[writeIndex++] = (char)unicodes[i];
}
return new string(chars);
}
public static int FindInstanceID <T> (this List<T> list, T target) where T : Object
{
int targetID = target.GetInstanceID();
for (int i = 0; i < list.Count; i++)
{
if (list[i].GetInstanceID() == targetID)
return i;
}
return -1;
}
public static bool Compare(this Color32 a, Color32 b)
{
return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a;
}
public static bool CompareRGB(this Color32 a, Color32 b)
{
return a.r == b.r && a.g == b.g && a.b == b.b;
}
public static bool Compare(this Color a, Color b)
{
return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a;
}
public static bool CompareRGB(this Color a, Color b)
{
return a.r == b.r && a.g == b.g && a.b == b.b;
}
public static Color32 Multiply (this Color32 c1, Color32 c2)
{
byte r = (byte)((c1.r / 255f) * (c2.r / 255f) * 255);
byte g = (byte)((c1.g / 255f) * (c2.g / 255f) * 255);
byte b = (byte)((c1.b / 255f) * (c2.b / 255f) * 255);
byte a = (byte)((c1.a / 255f) * (c2.a / 255f) * 255);
return new Color32(r, g, b, a);
}
public static Color32 Tint (this Color32 c1, Color32 c2)
{
byte r = (byte)((c1.r / 255f) * (c2.r / 255f) * 255);
byte g = (byte)((c1.g / 255f) * (c2.g / 255f) * 255);
byte b = (byte)((c1.b / 255f) * (c2.b / 255f) * 255);
byte a = (byte)((c1.a / 255f) * (c2.a / 255f) * 255);
return new Color32(r, g, b, a);
}
public static Color32 Tint(this Color32 c1, float tint)
{
byte r = (byte)(Mathf.Clamp(c1.r / 255f * tint * 255, 0, 255));
byte g = (byte)(Mathf.Clamp(c1.g / 255f * tint * 255, 0, 255));
byte b = (byte)(Mathf.Clamp(c1.b / 255f * tint * 255, 0, 255));
byte a = (byte)(Mathf.Clamp(c1.a / 255f * tint * 255, 0, 255));
return new Color32(r, g, b, a);
}
public static bool Compare(this Vector3 v1, Vector3 v2, int accuracy)
{
bool x = (int)(v1.x * accuracy) == (int)(v2.x * accuracy);
bool y = (int)(v1.y * accuracy) == (int)(v2.y * accuracy);
bool z = (int)(v1.z * accuracy) == (int)(v2.z * accuracy);
return x && y && z;
}
public static bool Compare(this Quaternion q1, Quaternion q2, int accuracy)
{
bool x = (int)(q1.x * accuracy) == (int)(q2.x * accuracy);
bool y = (int)(q1.y * accuracy) == (int)(q2.y * accuracy);
bool z = (int)(q1.z * accuracy) == (int)(q2.z * accuracy);
bool w = (int)(q1.w * accuracy) == (int)(q2.w * accuracy);
return x && y && z && w;
}
//public static void AddElementAtIndex<T>(this T[] array, int writeIndex, T item)
//{
// if (writeIndex >= array.Length)
// System.Array.Resize(ref array, Mathf.NextPowerOfTwo(writeIndex + 1));
// array[writeIndex] = item;
//}
/// <summary>
/// Insert item into array at index.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="array"></param>
/// <param name="index"></param>
/// <param name="item"></param>
//public static void Insert<T>(this T[] array, int index, T item)
//{
// if (index > array.Length - 1) return;
// T savedItem = item;
// for (int i = index; i < array.Length; i++)
// {
// savedItem = array[i];
// array[i] = item;
// item = savedItem;
// }
//}
/// <summary>
/// Insert item into array at index.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="array"></param>
/// <param name="index"></param>
/// <param name="item"></param>
//public static void Insert<T>(this T[] array, int index, T[] items)
//{
// if (index > array.Length - 1) return;
// System.Array.Resize(ref array, array.Length + items.Length);
// int sourceIndex = 0;
// T savedItem = items[sourceIndex];
// for (int i = index; i < array.Length; i++)
// {
// savedItem = array[i];
// array[i] = items[sourceIndex];
// items[sourceIndex] = savedItem;
// if (sourceIndex < items.Length - 1)
// sourceIndex += 1;
// else
// sourceIndex = 0;
// }
//}
}
public static class TMP_Math
{
public const float FLOAT_MAX = 32767;
public const float FLOAT_MIN = -32767;
public const int INT_MAX = 2147483647;
public const int INT_MIN = -2147483647;
public const float FLOAT_UNSET = -32767;
public const int INT_UNSET = -32767;
public static Vector2 MAX_16BIT = new Vector2(FLOAT_MAX, FLOAT_MAX);
public static Vector2 MIN_16BIT = new Vector2(FLOAT_MIN, FLOAT_MIN);
public static bool Approximately(float a, float b)
{
return (b - 0.0001f) < a && a < (b + 0.0001f);