Extract ObjectLayer interface to :api
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package com.bartlomiejpluta.base.api.game.map;
|
||||
|
||||
import com.bartlomiejpluta.base.api.game.entity.Entity;
|
||||
import com.bartlomiejpluta.base.api.game.entity.Movement;
|
||||
import org.joml.Vector2f;
|
||||
|
||||
public interface GameMap {
|
||||
@@ -21,11 +19,5 @@ public interface GameMap {
|
||||
|
||||
ColorLayer getColorLayer(int layerIndex);
|
||||
|
||||
void addEntity(int objectLayerIndex, Entity entity);
|
||||
|
||||
void removeEntity(int objectLayerIndex, Entity entity);
|
||||
|
||||
boolean isMovementPossible(int objectLayerIndex, Movement movement);
|
||||
|
||||
void setPassageAbility(int objectLayerIndex, int row, int column, PassageAbility passageAbility);
|
||||
ObjectLayer getObjectLayer(int layerIndex);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.bartlomiejpluta.base.api.game.map;
|
||||
|
||||
import com.bartlomiejpluta.base.api.game.entity.Entity;
|
||||
import com.bartlomiejpluta.base.api.game.entity.Movement;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ObjectLayer extends Layer {
|
||||
void addEntity(Entity entity);
|
||||
|
||||
void removeEntity(Entity entity);
|
||||
|
||||
List<Entity> getEntities();
|
||||
|
||||
void setPassageAbility(int row, int column, PassageAbility passageAbility);
|
||||
|
||||
PassageAbility[][] getPassageMap();
|
||||
|
||||
boolean isMovementPossible(Movement movement);
|
||||
}
|
||||
Reference in New Issue
Block a user