feat: time machine and time travel flow draft 1
This commit is contained in:
parent
c85debba56
commit
6e14d26ee4
7 changed files with 217 additions and 88 deletions
39
components/MaxEnergyUpgradeButton.vue
Normal file
39
components/MaxEnergyUpgradeButton.vue
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<template>
|
||||
<progress-button
|
||||
:label="label"
|
||||
:description="description"
|
||||
:max="$store.state.nextFluxCapacitorCost"
|
||||
:value="$store.state.currency"
|
||||
:current="$store.state.energyMax"
|
||||
:next="$store.state.energyMax + 200"
|
||||
@click="upgrade"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
computed: {
|
||||
label() {
|
||||
return `L${this.$store.state.fluxCapacitorLevel} Flux Capacitor`
|
||||
},
|
||||
description() {
|
||||
return `Increase maximum energy.`
|
||||
},
|
||||
current() {
|
||||
return this.$store.state.energyMax
|
||||
},
|
||||
next() {
|
||||
return this.$store.state.energyMax + 200
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
upgrade() {
|
||||
this.$store.commit(
|
||||
'spendCurrency',
|
||||
this.$store.state.nextFluxCapacitorCost
|
||||
)
|
||||
this.$store.commit('upgradeMaxEnergy')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in a new issue