add live select pannel
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cutt
|
||||
{
|
||||
public static class CuttRect_Helper
|
||||
{
|
||||
public static Rect Extend(this Rect rect, float extendVal)
|
||||
{
|
||||
float num = extendVal / 2f;
|
||||
rect.x -= num;
|
||||
rect.y -= num;
|
||||
rect.width += extendVal;
|
||||
rect.height += extendVal;
|
||||
return rect;
|
||||
}
|
||||
|
||||
public static Rect GetTopEdge(this Rect rect, float width)
|
||||
{
|
||||
rect.height = width;
|
||||
return rect;
|
||||
}
|
||||
|
||||
public static Rect GetLeftEdge(this Rect rect, float width)
|
||||
{
|
||||
rect.width = width;
|
||||
return rect;
|
||||
}
|
||||
|
||||
public static Rect GetRightEdge(this Rect rect, float width)
|
||||
{
|
||||
rect.x = rect.x + rect.width - width;
|
||||
rect.width = width;
|
||||
return rect;
|
||||
}
|
||||
|
||||
public static Rect GetBottomEdge(this Rect rect, float width)
|
||||
{
|
||||
rect.y = rect.y + rect.height - width;
|
||||
rect.height = width;
|
||||
return rect;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 79254c471421daf448c0e5d580d65b07
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cutt
|
||||
{
|
||||
public static class CuttVector3_Helper
|
||||
{
|
||||
public static Vector3 Round(this Vector3 This)
|
||||
{
|
||||
float num = 1000f;
|
||||
This.x = Mathf.Round(This.x * num) / num;
|
||||
This.y = Mathf.Round(This.y * num) / num;
|
||||
This.z = Mathf.Round(This.z * num) / num;
|
||||
return This;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 96f3df45728d55d458f7dd7dc1313f96
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
namespace Cutt
|
||||
{
|
||||
public static class LiveCharaPositionFlag_Helper
|
||||
{
|
||||
public static LiveCharaPositionFlag Default5 => LiveCharaPositionFlag.Center | LiveCharaPositionFlag.Left1 | LiveCharaPositionFlag.Right1 | LiveCharaPositionFlag.Left2 | LiveCharaPositionFlag.Right2;
|
||||
|
||||
public static LiveCharaPositionFlag Everyone => LiveCharaPositionFlag.All;
|
||||
|
||||
public static bool hasFlag(this LiveCharaPositionFlag This, LiveCharaPosition pos)
|
||||
{
|
||||
return This.hasFlag((LiveCharaPositionFlag)(1 << (int)pos));
|
||||
}
|
||||
|
||||
public static bool hasFlag(this LiveCharaPositionFlag This, int bit)
|
||||
{
|
||||
return This.hasFlag((LiveCharaPositionFlag)bit);
|
||||
}
|
||||
|
||||
public static bool hasFlag(this LiveCharaPositionFlag This, LiveCharaPositionFlag bit)
|
||||
{
|
||||
return (This & bit) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f222535d176e7dc45b3dcd966ce60a94
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
namespace Cutt
|
||||
{
|
||||
public static class LiveTimelineKeyAttribute_Ext
|
||||
{
|
||||
public static bool hasFlag(this LiveTimelineKeyAttribute This, LiveTimelineKeyAttribute bit)
|
||||
{
|
||||
return (This & bit) != (LiveTimelineKeyAttribute)0;
|
||||
}
|
||||
|
||||
public static LiveTimelineKeyAttribute addFlag(this LiveTimelineKeyAttribute This, LiveTimelineKeyAttribute bit, bool on)
|
||||
{
|
||||
if (on)
|
||||
{
|
||||
return This | bit;
|
||||
}
|
||||
return This & ~bit;
|
||||
}
|
||||
|
||||
public static int GetHighWord(this LiveTimelineKeyAttribute This)
|
||||
{
|
||||
return (int)This >> 16;
|
||||
}
|
||||
|
||||
public static LiveTimelineKeyAttribute SetHighWord(this LiveTimelineKeyAttribute This, int val)
|
||||
{
|
||||
LiveTimelineKeyAttribute liveTimelineKeyAttribute = (LiveTimelineKeyAttribute)(val << 16);
|
||||
return liveTimelineKeyAttribute | (This & LiveTimelineKeyAttribute.KeyCommonBitMask);
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7db579bdf3b10e04cb6fbb400a4b0b71
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cutt
|
||||
{
|
||||
public static class LiveTimelineVector3_Extend
|
||||
{
|
||||
public static Vector3 Bezier(this Vector3 start, ref Vector3 end, ref Vector3 cp, ref float t)
|
||||
{
|
||||
Vector3 v;
|
||||
start.Bezier(ref end, ref cp, ref t, out v);
|
||||
return v;
|
||||
}
|
||||
|
||||
public static void Bezier(this Vector3 start, ref Vector3 end, ref Vector3 cp, ref float t, out Vector3 v3)
|
||||
{
|
||||
float num = 1f - t;
|
||||
float num2 = t * t;
|
||||
float num3 = 2f * t * num;
|
||||
float num4 = num * num;
|
||||
v3.x = num2 * end.x + num3 * cp.x + num4 * start.x;
|
||||
v3.y = num2 * end.y + num3 * cp.y + num4 * start.y;
|
||||
v3.z = num2 * end.z + num3 * cp.z + num4 * start.z;
|
||||
}
|
||||
|
||||
public static Vector3 Bezier(this Vector3 start, ref Vector3 end, ref Vector3 cp1, ref Vector3 cp2, ref float t)
|
||||
{
|
||||
Vector3 v;
|
||||
start.Bezier(ref end, ref cp1, ref cp2, ref t, out v);
|
||||
return v;
|
||||
}
|
||||
|
||||
public static void Bezier(this Vector3 start, ref Vector3 end, ref Vector3 cp1, ref Vector3 cp2, ref float t, out Vector3 v3)
|
||||
{
|
||||
float num = 1f - t;
|
||||
float num2 = t * t * t;
|
||||
float num3 = 3f * t * t * num;
|
||||
float num4 = 3f * t * num * num;
|
||||
float num5 = num * num * num;
|
||||
v3.x = num2 * end.x + num3 * cp2.x + num4 * cp1.x + num5 * start.x;
|
||||
v3.y = num2 * end.y + num3 * cp2.y + num4 * cp1.y + num5 * start.y;
|
||||
v3.z = num2 * end.z + num3 * cp2.z + num4 * cp1.z + num5 * start.z;
|
||||
}
|
||||
|
||||
public static Vector3 Bezier(this Vector3 start, ref Vector3 end, ref Vector3 cp1, ref Vector3 cp2, ref Vector3 cp3, ref float t)
|
||||
{
|
||||
Vector3 v;
|
||||
start.Bezier(ref end, ref cp1, ref cp2, ref cp3, ref t, out v);
|
||||
return v;
|
||||
}
|
||||
|
||||
public static void Bezier(this Vector3 start, ref Vector3 end, ref Vector3 cp1, ref Vector3 cp2, ref Vector3 cp3, ref float t, out Vector3 v3)
|
||||
{
|
||||
float num = 1f - t;
|
||||
float num2 = t * t * t * t;
|
||||
float num3 = 4f * t * t * t * num;
|
||||
float num4 = 4f * t * t * num * num;
|
||||
float num5 = 4f * t * num * num * num;
|
||||
float num6 = num * num * num * num;
|
||||
v3.x = num2 * end.x + num3 * cp3.x + num4 * cp2.x + num5 * cp1.x + num6 * start.x;
|
||||
v3.y = num2 * end.y + num3 * cp3.y + num4 * cp2.y + num5 * cp1.y + num6 * start.y;
|
||||
v3.z = num2 * end.z + num3 * cp3.z + num4 * cp2.z + num5 * cp1.z + num6 * start.z;
|
||||
}
|
||||
|
||||
public static Vector3 Bezier(this Vector3 start, ref Vector3 end, ref Vector3 cp1, ref Vector3 cp2, ref Vector3 cp3, ref Vector3 cp4, ref float t)
|
||||
{
|
||||
Vector3 v;
|
||||
start.Bezier(ref end, ref cp1, ref cp2, ref cp3, ref cp4, ref t, out v);
|
||||
return v;
|
||||
}
|
||||
|
||||
public static void Bezier(this Vector3 start, ref Vector3 end, ref Vector3 cp1, ref Vector3 cp2, ref Vector3 cp3, ref Vector3 cp4, ref float t, out Vector3 v3)
|
||||
{
|
||||
float num = 1f - t;
|
||||
float num2 = t * t * t * t * t;
|
||||
float num3 = 5f * t * t * t * t * num;
|
||||
float num4 = 5f * t * t * t * num * num;
|
||||
float num5 = 5f * t * t * num * num * num;
|
||||
float num6 = 5f * t * num * num * num * num;
|
||||
float num7 = num * num * num * num * num;
|
||||
v3.x = num2 * end.x + num3 * cp4.x + num4 * cp3.x + num5 * cp2.x + num6 * cp1.x + num7 * start.x;
|
||||
v3.y = num2 * end.y + num3 * cp4.y + num4 * cp3.y + num5 * cp2.y + num6 * cp1.y + num7 * start.y;
|
||||
v3.z = num2 * end.z + num3 * cp4.z + num4 * cp3.z + num5 * cp2.z + num6 * cp1.z + num7 * start.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f0b87d30506225644ba75613620ac3ed
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user