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,6 +1,6 @@
using Cryville.Common;
using Cryville.Common.Collections.Specialized;
using Cryville.Common.Pdt;
using System.Collections.Generic;
using UnityEngine;
namespace Cryville.Crtr.Components {
@@ -8,7 +8,7 @@ namespace Cryville.Crtr.Components {
/// <summary>
/// The property operators of the component.
/// </summary>
public Dictionary<int, SkinProperty> Properties { get; private set; }
public IntKeyedDictionary<SkinProperty> Properties { get; private set; }
/// <summary>
/// Submits a property.
/// </summary>
@@ -22,7 +22,7 @@ namespace Cryville.Crtr.Components {
/// Creates a skin component.
/// </summary>
protected SkinComponent() {
Properties = new Dictionary<int, SkinProperty>();
Properties = new IntKeyedDictionary<SkinProperty>();
}
public virtual void Init() { }