提交工程

This commit is contained in:
2026-05-20 12:01:19 +08:00
commit e0ddde0393
5502 changed files with 596320 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
namespace ChillConnect
{
public static class StringExtend
{
public static double ToDouble(this string str)
{
double temp = 0d;
double.TryParse(str, out temp);
return temp;
}
public static float ToFloat(this string str)
{
float temp = 0;
float.TryParse(str, out temp);
return temp;
}
public static bool IsNullOrWhiteSpace(this string str)
{
return string.IsNullOrWhiteSpace(str);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 79592f013fcf6dc439f2a2940770a250
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 07cf9660c4614ccca70ef0f5889aae92
timeCreated: 1682316629
@@ -0,0 +1,24 @@
using UnityEngine;
namespace ChillConnect
{
public static class GameObjectExtend
{
public static void SetParent(this GameObject gameObject, GameObject parentGo, bool worldPositionStays = false)
{
if (parentGo)
{
gameObject.transform.SetParent(parentGo.transform, worldPositionStays);
}
}
public static void SetLayer(this GameObject gameObject, string layerName)
{
Transform[] transArr = gameObject.transform.GetComponentsInChildren<Transform>();
for (int i = 0; i < transArr.Length; i++)
{
transArr[i].gameObject.layer = LayerMask.NameToLayer(layerName);
}
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f33a4adea56c7dc41944ee83d4ef3f84
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: