Fix Warp util class

This commit is contained in:
2023-11-16 10:55:49 +01:00
parent 82903463e3
commit 58aac95c29

View File

@@ -35,6 +35,11 @@ public class Warp extends EntityDelegate {
public void update(float dt) {
if (entity != null && entity.getCoordinates().equals(getCoordinates())) {
beforeWarp();
if(entity.getLayer() != null) {
entity.getLayer().removeEntity(entity);
}
context.openMap(mapUid);
context.getMap().getObjectLayer(layer).addEntity(entity);
entity.setCoordinates(x, y);