Extract ColorLayer interface to :api

This commit is contained in:
2021-03-03 20:33:03 +01:00
parent f4b1b388e0
commit b31d8ab3f0
6 changed files with 124 additions and 66 deletions

View File

@@ -0,0 +1,18 @@
package com.bartlomiejpluta.base.api.game.map;
import com.bartlomiejpluta.base.api.internal.object.Placeable;
import com.bartlomiejpluta.base.api.internal.render.Renderable;
public interface ColorLayer extends Placeable, Renderable, Layer {
void setColor(float red, float green, float blue, float alpha);
void setColor(float red, float green, float blue);
void setRed(float red);
void setGreen(float green);
void setBlue(float blue);
void setAlpha(float alpha);
}

View File

@@ -19,6 +19,8 @@ public interface GameMap {
ImageLayer getImageLayer(int layerIndex);
ColorLayer getColorLayer(int layerIndex);
void addEntity(int objectLayerIndex, Entity entity);
void removeEntity(int objectLayerIndex, Entity entity);
@@ -26,6 +28,4 @@ public interface GameMap {
boolean isMovementPossible(int objectLayerIndex, Movement movement);
void setPassageAbility(int objectLayerIndex, int row, int column, PassageAbility passageAbility);
void setColor(int colorLayerIndex, float r, float g, float b, float alpha);
}