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,10 +43,12 @@ export default {
},
mounted() {
window.setInterval(() => {
this.gametick()
if (this.$store.state.playerAge < this.$store.state.playerAgeMax)
this.gametick()
}, 100)
window.setInterval(() => {
this.$store.commit('tickGameDate')
if (this.$store.state.playerAge < this.$store.state.playerAgeMax)
this.$store.commit('tickGameDate')
}, 1000)
},
methods: {