From b64e837535fb3e86a190a23c48f7479b860b805c Mon Sep 17 00:00:00 2001 From: Kitt Mustang Date: Wed, 23 Sep 2020 08:52:51 -0400 Subject: [PATCH] The sphere now flashes blue when the timer starts --- .../games/battlebanzai/BattleBanzaiGame.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/games/battlebanzai/BattleBanzaiGame.java b/src/main/java/com/eu/habbo/habbohotel/games/battlebanzai/BattleBanzaiGame.java index 31a561b5..07b83048 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/battlebanzai/BattleBanzaiGame.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/battlebanzai/BattleBanzaiGame.java @@ -44,6 +44,7 @@ public class BattleBanzaiGame extends Game { private final THashMap gameTiles; private int tileCount; private int countDown; + private int countDown2; public BattleBanzaiGame(Room room) { super(BattleBanzaiGameTeam.class, BattleBanzaiGamePlayer.class, room, true); @@ -58,8 +59,12 @@ public class BattleBanzaiGame extends Game { public void initialise() { if (!this.state.equals(GameState.IDLE)) return; - + + /* The first countdown is activated for the first two seconds emitting only the blue light (second interaction), + the second, after another two seconds, completely activates the sphere (third interaction). + */ this.countDown = 3; + this.countDown2 = 2; this.resetMap(); @@ -105,8 +110,15 @@ public class BattleBanzaiGame extends Game { if (this.countDown == 0) { for (HabboItem item : this.room.getRoomSpecialTypes().getItemsOfType(InteractionBattleBanzaiSphere.class)) { - item.setExtradata("2"); + item.setExtradata("1"); this.room.updateItemState(item); + if(this.countDown2 > 0) { + this.countDown2--; + if(this.countDown2 == 0) { + item.setExtradata("2"); + this.room.updateItemState(item); + } + } } }