示例#1
0
 public void AddPreExistingColliders(GrabbitHandler handler)
 {
     foreach (var col in ExistingCollider)
     {
         if (!handler.PreExistingColliders.Contains(col))
         {
             handler.PreExistingColliders.Add(col);
         }
     }
 }
示例#2
0
        public void NotifyHandlerNowSelected(GrabbitHandler otherHandler)
        {
            foreach (var otherCollider in otherHandler.AddedDynamicConvexColliders)
            {
                CollidingStaticGeo.Remove(otherCollider);
            }

            foreach (var staticCollider in otherHandler.AddedStaticConvexColliders)
            {
                CollidingStaticGeo.Remove(staticCollider);
            }

            if (CollidingStaticGeo.Count == 0)
            {
                IsCollidingWithStaticGeo = false;
                AverageCollisionNormal   = Vector3.zero;
                contacts.Clear();
            }
        }