初始化

This commit is contained in:
come
2025-07-26 16:56:42 +08:00
parent 8291dbb91c
commit fa81439a8c
2574 changed files with 328492 additions and 2170 deletions

View File

@@ -0,0 +1,30 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class MultiKeyDictionary<T1, T2, T3> : Dictionary<T1, Dictionary<T2, T3>>
{
new public Dictionary<T2, T3> this[T1 key]
{
get
{
if (!ContainsKey(key))
Add(key, new Dictionary<T2, T3>());
Dictionary<T2, T3> returnObj;
TryGetValue(key, out returnObj);
return returnObj;
}
}
public bool ContainsKey(T1 key1, T2 key2)
{
Dictionary<T2, T3> returnObj;
TryGetValue(key1, out returnObj);
if (returnObj == null)
return false;
return returnObj.ContainsKey(key2);
}
}