This commit is contained in:
shurongsen 2024-12-04 02:27:59 +08:00
parent 4ce38f4a0b
commit 06dc46ce1e
2 changed files with 23 additions and 3 deletions

7
README.md.meta Normal file
View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1a5354fa39508264fa2a035a542d0dcd
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -15,7 +15,7 @@ public class Base : MonoBehaviour
public GameObject ClosureObj; public GameObject ClosureObj;
public static GameObject GlobalObj; public static GameObject GlobalObj;
/// <summary> /// <summary>
//ウ<>シサッ ///初始化
/// </summary> /// </summary>
private void Awake() private void Awake()
{ {
@ -78,7 +78,11 @@ public class Base : MonoBehaviour
}); // 第二个动画 }); // 第二个动画
await tcs.Task; await tcs.Task;
} }
/// <summary>
/// 添加通用上移弹窗
/// </summary>
/// <param name="Details"></param>
/// <param name="time"></param>
public void addEventPopUp(string Details,float time = 5f)//添加弹窗 public void addEventPopUp(string Details,float time = 5f)//添加弹窗
{ {
GameObject prefab = Resources.Load<GameObject>("base/EventPopUp"); GameObject prefab = Resources.Load<GameObject>("base/EventPopUp");
@ -114,7 +118,11 @@ public class Base : MonoBehaviour
// addEventPopUp(response.message); // addEventPopUp(response.message);
// testhead = new Dictionary<string, string>(); // testhead = new Dictionary<string, string>();
//} //}
/// <summary>
/// 判读是否为小数,并且必须大于零
/// </summary>
/// <param name="text">判断的字符串</param>
/// <returns></returns>
public bool IsGreaterThanZeroDecimal(string text)//判断必须为小数而且大于0 public bool IsGreaterThanZeroDecimal(string text)//判断必须为小数而且大于0
{ {
// 使用正则表达式匹配大于0的小数 // 使用正则表达式匹配大于0的小数
@ -123,6 +131,11 @@ public class Base : MonoBehaviour
return regex.IsMatch(text); return regex.IsMatch(text);
} }
/// <summary>
/// 点击后关闭界面
/// </summary>
/// <param name="button"></param>
/// <param name="my_gameObject"></param>
public async void CancelOnClick(Button button,GameObject my_gameObject = null)//取消按钮 public async void CancelOnClick(Button button,GameObject my_gameObject = null)//取消按钮
{ {
await ButtonClickAnimationAsync(button.gameObject); await ButtonClickAnimationAsync(button.gameObject);