refactor: Update Unity to 2022.3.62
This commit is contained in:
@@ -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()) {
|
||||
|
Reference in New Issue
Block a user