Introduce IntKeyedDictionary to improve performance.

This commit is contained in:
2023-03-24 17:06:47 +08:00
parent 89f391f040
commit e2c683567e
18 changed files with 1274 additions and 94 deletions

View File

@@ -1,10 +1,10 @@
using System.Collections.Generic;
using Cryville.Common.Collections.Specialized;
using UnityEngine;
namespace Cryville.Crtr {
public class EffectManager {
readonly Dictionary<int, EffectGroup> _groups
= new Dictionary<int, EffectGroup>();
readonly IntKeyedDictionary<EffectGroup> _groups
= new IntKeyedDictionary<EffectGroup>();
public EffectManager(PdtSkin skin) {
foreach (var e in skin.effects) {
_groups.Add(e.Key.Key, new EffectGroup(e.Value));