#46 ajout d'une borne de recharge et changements mineurs du gameplay
This commit is contained in:
@@ -48,23 +48,22 @@ func _ready():
|
||||
Pointer.player = self
|
||||
|
||||
# Méthode déclenchée par la classe planet
|
||||
func _pass_day():
|
||||
energy = max_energy
|
||||
func _start_pass_day():
|
||||
controlling_player = false
|
||||
target_interactable = null
|
||||
|
||||
# Méthode déclenchée par la classe planet
|
||||
func _pass_day():
|
||||
recharge()
|
||||
|
||||
# Méthode déclenchée par la classe planet
|
||||
func _end_pass_day():
|
||||
controlling_player = true
|
||||
|
||||
func _process(_delta):
|
||||
get_input()
|
||||
move_and_slide()
|
||||
|
||||
func _on_root_gui_day_pass_pressed():
|
||||
controlling_player = false
|
||||
|
||||
func _on_root_gui_day_pass_finished():
|
||||
controlling_player = true
|
||||
|
||||
func _on_root_gui_game_click():
|
||||
try_use_item()
|
||||
|
||||
func _on_inventory_updated(_inventory: Inventory):
|
||||
emit_signal("player_updated", self)
|
||||
|
||||
@@ -162,6 +161,9 @@ func upgrade():
|
||||
energy += 1
|
||||
upgraded.emit()
|
||||
|
||||
func recharge(amount : int = max_energy):
|
||||
energy = min(energy + amount, max_energy)
|
||||
|
||||
func play_sfx(sound : String):
|
||||
match sound:
|
||||
"dig":
|
||||
|
||||
Reference in New Issue
Block a user