
com.almasb.fxgl.physics.SensorCollisionHandler Maven / Gradle / Ivy
/*
* FXGL - JavaFX Game Library. The MIT License (MIT).
* Copyright (c) AlmasB ([email protected]).
* See LICENSE for details.
*/
package com.almasb.fxgl.physics;
import com.almasb.fxgl.entity.Entity;
/**
* @author Almas Baimagambetov ([email protected])
*/
public abstract class SensorCollisionHandler {
/**
* Called when entities A and B have just collided and weren't colliding in the last tick.
*/
protected void onCollisionBegin(Entity other) {
// no default implementation
}
/**
* Called if entities A and B are currently colliding.
*/
protected void onCollision(Entity other) {
// no default implementation
// TODO: not implemented
}
/**
* Called when entities A and B have just stopped colliding and were colliding in the last tick.
*/
protected void onCollisionEnd(Entity other) {
// no default implementation
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy