Improve other entities collision detection
This commit is contained in:
@@ -17,6 +17,8 @@ public interface Entity extends Placeable, Renderable, Updatable {
|
||||
|
||||
Movement prepareMovement(Direction direction);
|
||||
|
||||
Movement getMovement();
|
||||
|
||||
Direction getFaceDirection();
|
||||
|
||||
void setFaceDirection(Direction direction);
|
||||
|
||||
@@ -41,6 +41,11 @@ public abstract class EntityDelegate implements Entity {
|
||||
return entity.prepareMovement(direction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Movement getMovement() {
|
||||
return entity.getMovement();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Direction getFaceDirection() {
|
||||
return entity.getFaceDirection();
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package com.bartlomiejpluta.base.api.game.entity;
|
||||
|
||||
|
||||
import com.bartlomiejpluta.base.api.game.map.layer.object.ObjectLayer;
|
||||
import org.joml.Vector2i;
|
||||
|
||||
public interface Movement {
|
||||
boolean perform(ObjectLayer layer);
|
||||
boolean perform();
|
||||
|
||||
Movement another();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user