예제 #1
0
 public static boolean stateHasChanged(
     int objectType, int objectX, int objectY, int objectHeight) {
   for (StateObject so : stateChanges) {
     if (so.getHeight() != objectHeight) continue;
     if (so.getX() == objectX && so.getY() == objectY && so.getType() == objectType) return true;
   }
   return false;
 }
예제 #2
0
 public static void removeStateChange(int objectType, int objectX, int objectY, int objectHeight) {
   for (int index = 0; index < stateChanges.size(); index++) {
     StateObject so = stateChanges.get(index);
     if (so == null) continue;
     if ((so.getX() == objectX && so.getY() == objectY && so.getHeight() == objectHeight)
             && so.getType() == objectType
         || so.getStatedObject() == objectType) {
       stateChanges.remove(index);
       break;
     }
   }
 }