示例#1
0
 /**
  * Remove all GameObject instances of given class type.
  *
  * @param type De class type of the instances to be removed
  */
 public <T> void deleteAllGameObjectsOfType(Class<T> type) {
   for (int i = 0; i < items.size(); i++) {
     GameObject go = items.get(i);
     if (go.getClass() == type) {
       go.clearActive();
     }
   }
 }
示例#2
0
 /**
  * * Delete a GameObject from the game.
  *
  * @param gameObject The GameObject instance to be removed
  */
 public final void deleteGameObject(GameObject gameObject) {
   gameObject.clearActive();
 }