Exemplo n.º 1
0
        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();
        }
        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 ();
        }