gamestatusui.js 673 B

123456789101112131415161718
  1. export function gameStatusUI(game, stageData) {
  2. }
  3. export function showGameStatusUI(game, stageData) {
  4. document.getElementById("game-status-container").style.display = "flex"
  5. }
  6. export function hideGameStatusUI(game, stageData) {
  7. document.getElementById("game-status-container").style.display = "none"
  8. }
  9. export function updateGameStatusUI(game, stageData) {
  10. document.getElementById("currency-progress-amount").style.width = `${Math.min(100, Math.ceil(100* (stageData.currency / 1000)))}%`
  11. document.getElementById("currency-amount").innerHTML = stageData.currency
  12. document.getElementById("current-day-text").innerHTML = `day ${stageData.currentDay}`
  13. }