feat: Issue #51, stop time when player reaches max age
This commit is contained in:
parent
e19621e124
commit
08f5368e1c
|
@ -43,9 +43,11 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
window.setInterval(() => {
|
window.setInterval(() => {
|
||||||
|
if (this.$store.state.playerAge < this.$store.state.playerAgeMax)
|
||||||
this.gametick()
|
this.gametick()
|
||||||
}, 100)
|
}, 100)
|
||||||
window.setInterval(() => {
|
window.setInterval(() => {
|
||||||
|
if (this.$store.state.playerAge < this.$store.state.playerAgeMax)
|
||||||
this.$store.commit('tickGameDate')
|
this.$store.commit('tickGameDate')
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
|
|
Reference in New Issue