Fix Warp util class
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user