Przeglądaj źródła

Add a getStat function

tags/v0.1.3
Fen Dweller 6 lat temu
rodzic
commit
5fd3c7392e
1 zmienionych plików z 4 dodań i 0 usunięć
  1. +4
    -0
      game.js

+ 4
- 0
game.js Wyświetl plik

@@ -55,6 +55,10 @@ function initGamePostSetup(state) {
createStatDisplays(state.player.stats, "player");
}

function getStat(stat, state) {
return state.palyer.stats[stat].value;
}

function changeStat(stat, amount, state) {
let value = state.player.stats[stat].value;
value += amount;


Ładowanie…
Anuluj
Zapisz