コード例 #1
0
 public static bool TryGetID(BeaverType beaverType, out int controllerID)
 {
     return(reverseDict.TryGetValue(beaverType, out controllerID));
 }
コード例 #2
0
 public static bool HasMapping(BeaverType beaverType)
 {
     return(reverseDict.ContainsKey(beaverType));
 }
コード例 #3
0
 public static bool TryGetBeaver(int controllerID, out BeaverType beaverType)
 {
     return(mappingDict.TryGetValue(controllerID, out beaverType));
 }
コード例 #4
0
 public static void SetMapping(int controllerID, BeaverType beaverType)
 {
     NumberOfRegisteredPlayers++;
     mappingDict.Add(controllerID, beaverType);
     reverseDict.Add(beaverType, controllerID);
 }