UI工具翻新

1. 增加UI工具
2. 增加设置页面
3. GameLoop更新
4. 导入ActionKit工具
This commit is contained in:
2025-04-21 18:53:30 +08:00
parent 563ceaaaf6
commit 9f20ef52d8
178 changed files with 12692 additions and 10044 deletions
@@ -0,0 +1,45 @@
using System.Collections.Generic;
namespace AibisDream.Kit
{
public static class ListPool<T>
{
/// <summary>
/// 栈对象:存储多个List
/// </summary>
static readonly Stack<List<T>> ListStack = new(8);
/// <summary>
/// 出栈:获取某个List对象
/// </summary>
/// <returns></returns>
public static List<T> Get()
{
return ListStack.Count == 0 ? new List<T>(8) : ListStack.Pop();
}
/// <summary>
/// 入栈:将List对象添加到栈中
/// </summary>
/// <param name="toRelease"></param>
public static void Release(List<T> toRelease)
{
if (ListStack.Contains(toRelease))
{
throw new System.InvalidOperationException(
"重复回收 ListThe List is released even though it is in the pool");
}
toRelease.Clear();
ListStack.Push(toRelease);
}
}
public static class ListPoolExtensions
{
public static void Release2Pool<T>(this List<T> self)
{
ListPool<T>.Release(self);
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 89941b90c44f437dbdda9030f43dd912
timeCreated: 1744888603