Extract TileLayer interface to :api
This commit is contained in:
@@ -7,6 +7,8 @@ import org.joml.Vector2f;
|
||||
public interface GameMap {
|
||||
Vector2f getSize();
|
||||
|
||||
TileLayer getTileLayer(int layerIndex);
|
||||
|
||||
void addEntity(int objectLayerIndex, Entity entity);
|
||||
|
||||
void removeEntity(int objectLayerIndex, Entity entity);
|
||||
@@ -15,11 +17,5 @@ public interface GameMap {
|
||||
|
||||
void setPassageAbility(int objectLayerIndex, int row, int column, PassageAbility passageAbility);
|
||||
|
||||
void setTile(int tileLayerIndex, int row, int column, int tileId);
|
||||
|
||||
void setTile(int tileLayerIndex, int row, int column, int tileSetRow, int tileSetColumn);
|
||||
|
||||
void clearTile(int tileLayerIndex, int row, int column);
|
||||
|
||||
void setColor(int colorLayerIndex, float r, float g, float b, float alpha);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.bartlomiejpluta.base.api.game.map;
|
||||
|
||||
import com.bartlomiejpluta.base.api.internal.logic.Updatable;
|
||||
import com.bartlomiejpluta.base.api.internal.render.Renderable;
|
||||
|
||||
public interface Layer extends Renderable, Updatable {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.bartlomiejpluta.base.api.game.map;
|
||||
|
||||
public interface TileLayer extends Layer {
|
||||
void setTile(int row, int column, int tileId);
|
||||
|
||||
void setTile(int row, int column, int tileSetRow, int tileSetColumn);
|
||||
|
||||
void clearTile(int row, int column);
|
||||
}
|
||||
Reference in New Issue
Block a user