Esempio n. 1
0
    void Start()
    {
        // Runtime test
        string keyToCheck = "abc";
        bool   contains   = myGenericDict.ContainsKey(keyToCheck);

        Debug.LogFormat("myGenericDict contains '{0}': {1}", keyToCheck, contains);
    }
Esempio n. 2
0
    public void AddTileType(string tileName, GameObject prototype, Material material)
    {
        var newTileType = Instantiate(prototype, transform);

        newTileType.GetComponent <Renderer>().material = material;
        newTileType.name = tileName;
        if (tilePrefabs.ContainsKey(tileName))
        {
            DestroyImmediate(tilePrefabs[tileName]);
            tilePrefabs.Remove(tileName);
        }

        tilePrefabs.Add(tileName, newTileType);
        newTileType.SetActive(false);
    }
Esempio n. 3
0
 public TransferHandle GetTransferHandleByBankName(string bankName)
 {
     return(GenericDictionary.ContainsKey(bankName) ? GenericDictionary[bankName]() : null);
 }
Esempio n. 4
0
 public bool ContainsKey(string key)
 {
     return(_dataBase.ContainsKey(key));
 }