Explorar el Código

Add a getStat function

tags/v0.1.3
Fen Dweller hace 6 años
padre
commit
5fd3c7392e
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. +4
    -0
      game.js

+ 4
- 0
game.js Ver fichero

@@ -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;


Cargando…
Cancelar
Guardar