Skip to content
Snippets Groups Projects
CollisionAble.java 270 B
package lab;

import javafx.geometry.Rectangle2D;

public interface CollisionAble {
	default boolean overlaps(CollisionAble other) {
		return getBoundingBox().intersects(other.getBoundingBox());
	}

	void hitBy(CollisionAble other);
	
	Rectangle2D getBoundingBox();
	
}