refactor: Update Unity to 2022.3.62

This commit is contained in:
2025-06-21 01:22:02 +08:00
parent d71bf7d4a5
commit 283783954f
112 changed files with 778 additions and 907 deletions

View File

@@ -8,7 +8,7 @@ namespace Cryville.Crtr.Skin {
readonly EffectPool _pool;
class EffectPool : ObjectPool<EffectInstance> {
readonly List<EffectInstance> _instances
= new List<EffectInstance>();
= new();
readonly EffectGroup _group;
public EffectPool(EffectGroup group) : base(256) {
_group = group;
@@ -23,9 +23,9 @@ namespace Cryville.Crtr.Skin {
}
}
readonly Dictionary<float, EffectInstance> _instances
= new Dictionary<float, EffectInstance>();
= new();
readonly List<EffectInstance> _endQueue
= new List<EffectInstance>();
= new();
public EffectGroup(EffectDefinition def) {
Definition = def;
_pool = new EffectPool(this);
@@ -51,8 +51,7 @@ namespace Cryville.Crtr.Skin {
}
}
public void Emit(float index, Transform target = null) {
EffectInstance instance;
bool flag = _instances.TryGetValue(index, out instance);
bool flag = _instances.TryGetValue(index, out EffectInstance instance);
if (!flag) _instances.Add(index, instance = _pool.Rent());
instance.Index = index;
if (instance.CanEmit()) {