Exemplo n.º 1
0
 public void UpdateObjects()
 {
     for (int i = 0; i < mObjects.Count; i++)
     {
         if (mObjects[i] != null)
         {
             if (!mObjects[i].inBounds())
             {
                 mForceManager.removeForceGenerator(mObjects[i].mBouyancyForce);
                 Destroy(mObjects[i].gameObject, 1.0f);
                 mObjects.RemoveAt(i);
                 mObjects.TrimExcess();
             }
         }
     }
 }