Esempio n. 1
0
    public VectorMesh Add(string key, GameObject go)
    {
        VectorMesh vm = go.GetComponent <VectorMesh>() as VectorMesh;

        if (!vm)
        {
            print("not VectorMesh GameObject");
            return(null);
        }

        if (vmDictionary.ContainsKey(key))
        {
            vmDictionary.Remove(key);
        }
        vmDictionary.Add(key, vm);
        vm.OnInsertComplete();

        return(vm);
    }
Esempio n. 2
0
    public bool Remove(string key)
    {
        if (key == null)
        {
            print("key is ArgumentNullException");
            return(false);
        }

        if (!vmDictionary.ContainsKey(key))
        {
            print("not find key");
            return(false);
        }

        VectorMesh vm = vmDictionary[key];

        vmDictionary.Remove(key);
        vm.OnRemoveComplete();

        return(true);
    }