145146147148149150151152153154155
} if (p instanceof SpikePit) {// for instance of SpikePit SpikePit sp = (SpikePit) p; SpikePitRectangle tRect = sp.getRectangle(); if(tRect.intersects(rect)) { return false; } } if (p instanceof FireRing) {// for instance of fireRing
153154155156157158159160161162163
} if (p instanceof FireRing) {// for instance of fireRing FireRing fr = (FireRing) p; FireRingRectangle tRect = fr.getRectangle(); if(tRect.intersects(rect)) { return false; } } if (p instanceof TNT) {// for instance of TNT
161162163164165166167168169170171
} if (p instanceof TNT) {// for instance of TNT TNT tnt = (TNT) p; TNTRectangle tRect = tnt.getRectangle(); if(tRect.intersects(rect)) { return false; } }
237238239240241242243244245246247
245246247248249250251252253254255
253254255256257258259260261262263
320321322323324325326327328329330
328329330331332333334335336337338
336337338339340341342343344345346