备份CatanBuilding瘦身独立工程
This commit is contained in:
14
Assets/Scripts/UI/DictionaryExtension.cs
Normal file
14
Assets/Scripts/UI/DictionaryExtension.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public static class DictionaryExtension
|
||||
{
|
||||
|
||||
public static Tvalue TryGet<Tkey,Tvalue>(this Dictionary<Tkey,Tvalue> dict,Tkey key)
|
||||
{
|
||||
Tvalue value;
|
||||
dict.TryGetValue(key, out value);
|
||||
return value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user