mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-05 05:02:02 +02:00
Add split description in italia and english and add directory it in levels
This commit is contained in:
parent
943126647b
commit
2c275424a3
104 changed files with 3510 additions and 38 deletions
scenes
|
@ -3,6 +3,7 @@ extends Control
|
|||
var card_store = {}
|
||||
var cards
|
||||
var card_radius = 1500
|
||||
var lang = "it" # TODO: Make a global variable to setting dir and cards localizations
|
||||
|
||||
func _ready():
|
||||
load_card_store()
|
||||
|
@ -16,7 +17,7 @@ func _process(_delta):
|
|||
|
||||
func load_card_store():
|
||||
card_store = {}
|
||||
var cards_json = JSON.parse(helpers.read_file("res://resources/cards.json")).result
|
||||
var cards_json = JSON.parse(helpers.read_file("res://resources/cards_i18n.json")).result
|
||||
for card in cards_json:
|
||||
card_store[card["id"]] = card
|
||||
|
||||
|
@ -39,7 +40,7 @@ func draw_card(card):
|
|||
|
||||
new_card.id = card["id"]
|
||||
new_card.command = card["command"]
|
||||
new_card.description = card["description"]
|
||||
new_card.description = card["description"][lang]
|
||||
new_card.energy = 0 #card.energy
|
||||
new_card.position = Vector2(rect_size.x, rect_size.y*2)
|
||||
add_child(new_card)
|
||||
|
|
|
@ -72,6 +72,7 @@ text = "Quit"
|
|||
position = Vector2( 967.924, 306.066 )
|
||||
scale = Vector2( 0.320895, 0.320895 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[connection signal="pressed" from="VBoxContainer/Button" to="." method="levels"]
|
||||
[connection signal="pressed" from="VBoxContainer/Button3" to="." method="sandbox"]
|
||||
[connection signal="pressed" from="VBoxContainer/Button2" to="." method="quit"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue