Add camera support in :API Context
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
package com.bartlomiejpluta.base.api.context;
|
||||
|
||||
import com.bartlomiejpluta.base.api.entity.Entity;
|
||||
import org.joml.Vector2f;
|
||||
|
||||
public interface Context {
|
||||
void openMap(String mapUid);
|
||||
|
||||
Entity createEntity(String entitySetUid);
|
||||
|
||||
void setCameraPosition(Vector2f position);
|
||||
|
||||
void setCameraPosition(float x, float y);
|
||||
}
|
||||
|
||||
@@ -2,16 +2,23 @@ package com.bartlomiejpluta.base.api.map;
|
||||
|
||||
import com.bartlomiejpluta.base.api.entity.Entity;
|
||||
import com.bartlomiejpluta.base.api.entity.Movement;
|
||||
import org.joml.Vector2f;
|
||||
|
||||
public interface GameMap {
|
||||
Vector2f getSize();
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
@@ -9,4 +9,6 @@ public interface MapHandler {
|
||||
void input(Keyboard keyboard);
|
||||
|
||||
void update(Context context, GameMap map, float dt);
|
||||
|
||||
void postRender(float windowWidth, float windowHeight);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user