Example #1
0
        public void AddConnection(IDPair key, GameObject connection)
        {
            bool   check             = Pool.ContainsKey(key);
            IDPair reverseConnection = new IDPair(key.ID_ConnectionPoint_B, key.ID_ConnectionPoint_A);
            bool   reverseCheck      = Pool.ContainsKey(reverseConnection);

            if (check == false && reverseCheck == false)
            {
                Pool.Add(key, connection);
            }
        }
Example #2
0
        public GameObject GetConnection(IDPair key)
        {
            GameObject result;

            bool check = Pool.TryGetValue(key, out result);

            if (check == false)
            {
                IDPair reverseConnection = new IDPair(key.ID_ConnectionPoint_B, key.ID_ConnectionPoint_A);
                check = Pool.TryGetValue(reverseConnection, out result);
            }
            return(result);
        }