feat: Issue #51, stop time when player reaches max age

This commit is contained in:
John McCardle 2022-01-10 18:38:43 -05:00
parent e19621e124
commit 08f5368e1c
1 changed files with 4 additions and 2 deletions

View File

@ -43,9 +43,11 @@ export default {
},
mounted() {
window.setInterval(() => {
if (this.$store.state.playerAge < this.$store.state.playerAgeMax)
this.gametick()
}, 100)
window.setInterval(() => {
if (this.$store.state.playerAge < this.$store.state.playerAgeMax)
this.$store.commit('tickGameDate')
}, 1000)
},