示例#1
0
 public static void PoolPair(CollisionPair pair)
 {
     pair.Deactivate();
     if (LockstepManager.PoolingEnabled)
     {
         CachedCollisionPairs.Add(pair);
     }
 }
        public static void Dessimilate(LSBody body)
        {
            if (!SimObjectExists [body.ID])
            {
                Debug.LogWarning("Object with ID" + body.ID.ToString() + "cannot be dessimilated because it it not assimilated");
                return;
            }

            SimObjectExists [body.ID] = false;
            CachedIDs.Add(body.ID);

            for (i = 0; i < FastCollisionPairs.Count; i++)
            {
                pair = FastCollisionPairs.innerArray [i];
                if (pair.Body1 == body || pair.Body2 == body)
                {
                    pair.Deactivate();
                }
            }

            AssimilatedCount--;
        }
        public static void Dessimilate(LSBody body)
        {
            if (!SimObjectExists [body.ID]) {
                Debug.LogWarning ("Object with ID" + body.ID.ToString () + "cannot be dessimilated because it it not assimilated");
                return;
            }

            SimObjectExists [body.ID] = false;
            CachedIDs.Add (body.ID);

            for (i = 0; i < FastCollisionPairs.Count; i++) {
                pair = FastCollisionPairs.innerArray [i];
                if (pair.Body1 == body || pair.Body2 == body) {
                    pair.Deactivate ();
                }
            }

            AssimilatedCount--;
            body.Deactivate ();
        }