refactor du code et ajouts des quotas, avec des récompense entre chaque quota #68
This commit is contained in:
@@ -12,21 +12,21 @@ func _on_player_updated(player:Player):
|
||||
|
||||
update_no_energy_left_info(player.energy)
|
||||
|
||||
func _on_day_pass_pressed():
|
||||
|
||||
await $AnimationPlayer.animation_finished
|
||||
$AnimationPlayer.play("recharge_fade_out")
|
||||
await $AnimationPlayer.animation_finished
|
||||
|
||||
func _on_planet_updated(planet:Planet):
|
||||
%DayCount.text = "Day " + str(planet.day) + "/" + str(planet.day_limit)
|
||||
%DecontaminationCoverage.text = str(roundi(planet.decontamination_surface)) + " m2"
|
||||
|
||||
var quota_progression_percent : float = (planet.decontamination_surface - planet.surface_on_last_quota) / (planet.next_quota - planet.surface_on_last_quota) * 100
|
||||
%QuotaProgressText.text = str(roundi(quota_progression_percent)) + " %"
|
||||
get_tree().create_tween().tween_property(
|
||||
%QuotaProgressBar,
|
||||
"value",
|
||||
quota_progression_percent,
|
||||
0.5,
|
||||
)
|
||||
|
||||
func _on_player_action_tried_without_energy():
|
||||
$AnimationPlayer.play("no_energy_left")
|
||||
|
||||
|
||||
func _on_pause_pressed():
|
||||
pause_asked.emit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user