mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-13 19:04:54 +01:00
Reload card store when reloading a level
This commit is contained in:
parent
7c96367d72
commit
00ec6f6700
2 changed files with 2 additions and 0 deletions
|
@ -15,6 +15,7 @@ func _process(_delta):
|
|||
$Energy.text = str(game.energy)
|
||||
|
||||
func load_card_store():
|
||||
card_store = {}
|
||||
var cards_json = JSON.parse(helpers.read_file("res://resources/cards.json")).result
|
||||
for card in cards_json:
|
||||
card_store[card["id"]] = card
|
||||
|
|
|
@ -121,6 +121,7 @@ func load_level(level_id):
|
|||
|
||||
|
||||
func reload_level():
|
||||
cards.load_card_store()
|
||||
levels.reload()
|
||||
load_level(game.current_level)
|
||||
|
||||
|
|
Loading…
Reference in a new issue