update ManaShards event

This commit is contained in:
Anthony Calosa
2023-03-26 21:17:38 +08:00
parent 35f6250843
commit 71a6d82d61
7 changed files with 36 additions and 29 deletions

View File

@@ -470,6 +470,13 @@ public class MatchController extends AbstractGuiGame {
}
}
@Override
public void updateShards(final Iterable<PlayerView> livesUpdate) {
for (final PlayerView p : livesUpdate) {
view.getPlayerPanel(p).updateShards();
}
}
@Override
public void updateZones(final Iterable<PlayerZoneUpdate> zonesToUpdate) {
view.updateZones(zonesToUpdate);

View File

@@ -260,6 +260,10 @@ public class VPlayerPanel extends FContainer {
lblLife.update();
}
public void updateShards() {
lblLife.updateShards();
}
public void updateManaPool() {
tabManaPool.update();
}
@@ -506,6 +510,9 @@ public class VPlayerPanel extends FContainer {
Gdx.input.vibrate(Math.min(vibrateDuration, 2000));
}
}
private void updateShards() {
manaShards = player.getNumManaShards();
}
@Override
public boolean tap(float x, float y, int count) {