Introduce IntKeyedDictionary
to improve performance.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using Cryville.Common.Collections.Specialized;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cryville.Crtr {
|
||||
@@ -6,11 +6,11 @@ namespace Cryville.Crtr {
|
||||
public int Name { get; private set; }
|
||||
public Transform Transform { get; private set; }
|
||||
public SkinContext SkinContext { get; private set; }
|
||||
public Dictionary<int, PropSrc> PropSrcs { get; private set; }
|
||||
public IntKeyedDictionary<PropSrc> PropSrcs { get; private set; }
|
||||
public Anchor(int name, Transform transform, int propSrcCount = 0) {
|
||||
Name = name;
|
||||
Transform = transform;
|
||||
if (propSrcCount > 0) PropSrcs = new Dictionary<int, PropSrc>(propSrcCount);
|
||||
if (propSrcCount > 0) PropSrcs = new IntKeyedDictionary<PropSrc>(propSrcCount);
|
||||
SkinContext = new SkinContext(transform, PropSrcs);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user