Esempio n. 1
0
 public void UnregisterCollision(GrooveCollider snappingCollider, GameObject tapCollider)
 {
     if (colliderDictionary[snappingCollider].TapPosition == null || colliderDictionary[snappingCollider].TapPosition.GetHashCode() != tapCollider.GetHashCode() || colliderDictionary[snappingCollider].IsConnected)
     {
         return;
     }
     Debug.Log("Groove Unregistered");
     RemovePinHighLight(tapCollider);
     colliderDictionary[snappingCollider].ResetObject();
 }
Esempio n. 2
0
        public void RegisterCollision(GrooveCollider snappingCollider, GameObject tapCollider)
        {
            Debug.Log("Registered Collision");
            if (colliderDictionary[snappingCollider].TapPosition != null)
            {
                return;
            }

            if (GetComponentInParent <BlockCommunication>().IsIndirectlyAttachedToHand() && tapCollider.transform.childCount == 0)
            {
                AddPinHighLight(tapCollider);
            }

            Debug.Log("Collision Entried");

            colliderDictionary[snappingCollider].IsConnected = acceptNewCollisionsAsConnected;

            colliderDictionary[snappingCollider].TapPosition    = tapCollider;
            colliderDictionary[snappingCollider].GroovePosition = snappingCollider.gameObject;
            colliderDictionary[snappingCollider].CollidedBlock  = tapCollider.transform.root.gameObject;
        }