mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 06:30:42 +00:00
add max troops to control panel
This commit is contained in:
@@ -168,6 +168,9 @@
|
||||
* implement private game DONE 10/15/2024
|
||||
* private game can select map DONE 10/16/2024
|
||||
* Test on android DONE 10/17/2024
|
||||
* add troop max
|
||||
* use twitter emojis
|
||||
* create build menu
|
||||
* NPC has relations
|
||||
* private game shows how many players joined
|
||||
* optimize sendBoat function
|
||||
|
||||
@@ -24,13 +24,7 @@ export class ControlPanel extends LitElement implements Layer {
|
||||
private _maxTroops: number;
|
||||
|
||||
@state()
|
||||
private _manpower: number = 0;
|
||||
|
||||
@state()
|
||||
private _reserve: number = 0;
|
||||
|
||||
@state()
|
||||
private _gold: number = 0
|
||||
private troopRate: number;
|
||||
|
||||
@state()
|
||||
private _isVisible = false;
|
||||
@@ -52,6 +46,7 @@ export class ControlPanel extends LitElement implements Layer {
|
||||
return
|
||||
}
|
||||
this._troops = player.troops()
|
||||
this._maxTroops = this.game.config().maxTroops(player)
|
||||
}
|
||||
|
||||
onAttackRatioChange(newRatio: number) {
|
||||
@@ -135,7 +130,7 @@ export class ControlPanel extends LitElement implements Layer {
|
||||
<div class="control-panel-info">
|
||||
<div class="info-row">
|
||||
<span class="info-label">Troops:</span>
|
||||
<span>${renderTroops(this._troops)}</span>
|
||||
<span>${renderTroops(this._troops)} / ${renderTroops(this._maxTroops)}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="slider-container">
|
||||
|
||||
Reference in New Issue
Block a user