DepositEvent first (#811)
* Update EventType.java * Update InputHandler.java
This commit is contained in:
@@ -132,7 +132,13 @@ public class EventType{
|
|||||||
|
|
||||||
/** Called when a player deposits items to a block.*/
|
/** Called when a player deposits items to a block.*/
|
||||||
public static class DepositEvent{
|
public static class DepositEvent{
|
||||||
|
public final Tile tile;
|
||||||
|
public final Player player;
|
||||||
|
|
||||||
|
public DepositEvent(Tile tile, Player player){
|
||||||
|
this.tile = tile;
|
||||||
|
this.player = player;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GameOverEvent{
|
public static class GameOverEvent{
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
int[] remaining = {accepted, accepted};
|
int[] remaining = {accepted, accepted};
|
||||||
Block block = tile.block();
|
Block block = tile.block();
|
||||||
|
|
||||||
Events.fire(new DepositEvent());
|
Core.app.post(() -> Events.fire(new DepositEvent(tile, player)));
|
||||||
|
|
||||||
for(int i = 0; i < sent; i++){
|
for(int i = 0; i < sent; i++){
|
||||||
boolean end = i == sent - 1;
|
boolean end = i == sent - 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user