Add some additional methods to Entity and GameMap API classes
This commit is contained in:
@@ -14,4 +14,6 @@ public interface Entity {
|
||||
void setFaceDirection(Direction direction);
|
||||
|
||||
void setSpeed(float speed);
|
||||
|
||||
void setAnimationSpeed(float speed);
|
||||
}
|
||||
|
||||
@@ -4,9 +4,19 @@ import com.bartlomiejpluta.base.api.entity.Entity;
|
||||
import com.bartlomiejpluta.base.api.entity.Movement;
|
||||
|
||||
public interface GameMap {
|
||||
void addEntity(int layerIndex, Entity entity);
|
||||
void addEntity(int objectLayerIndex, Entity entity);
|
||||
|
||||
void removeEntity(int layerIndex, Entity entity);
|
||||
void removeEntity(int objectLayerIndex, Entity entity);
|
||||
|
||||
boolean isMovementPossible(int layerIndex, Movement movement);
|
||||
boolean isMovementPossible(int objectLayerIndex, Movement movement);
|
||||
|
||||
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 setPassageAbility(int objectLayerIndex, int row, int column, PassageAbility passageAbility);
|
||||
|
||||
void setColor(int colorLayerIndex, float r, float g, float b, float alpha);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.bartlomiejpluta.base.api.map;
|
||||
|
||||
public enum PassageAbility {
|
||||
BLOCK,
|
||||
ALLOW,
|
||||
UP_ONLY,
|
||||
DOWN_ONLY,
|
||||
LEFT_ONLY,
|
||||
RIGHT_ONLY
|
||||
}
|
||||
Reference in New Issue
Block a user