From daf6e69f604ddab56394eda147d43c5ca88aa608 Mon Sep 17 00:00:00 2001 From: Zakarya Date: Fri, 29 Mar 2024 18:12:59 -0700 Subject: [PATCH] Fix comments --- data/character/character.gd | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/data/character/character.gd b/data/character/character.gd index 1057416..d99dd04 100644 --- a/data/character/character.gd +++ b/data/character/character.gd @@ -19,7 +19,7 @@ var status = { var current_tool = "none" -func get_total_points_for_next_level(): #Yes, this name is very long. Deal with it +func get_total_points_for_next_level(): # Yes, this name is very long. Deal with it return status.level*10 func change_tool(tool): @@ -28,7 +28,7 @@ func change_tool(tool): $body_pivot/body/tool.position = game_data.tools[tool].offset func _ready(): - change_tool("stick") #this is when the starting tool is set + change_tool("stick") # This is when the starting tool is set func _physics_process(delta): var pre_velocity = Vector2(0, 0) @@ -47,20 +47,20 @@ func _process(delta): inventory[hit_object.resource_type] += 1 inventory.points += 1 hit_object.get_node("animation").play("hit") - - #update inventory HUD + + # Update inventory HUD $hud/inventory/stone_label.text = str(inventory.stone) $hud/inventory/wood_label.text = str(inventory.wood) $hud/level/points.text = str(inventory.points) + "/" + str(get_total_points_for_next_level()) $hud/level/level_bar.value = inventory.points - - #update status HUD + + # Update status HUD $hud/bars/health.value = status.health $hud/bars/stamina.value = status.stamina $hud/level/level.text = "Level " + str(status.level) $hud/level/level_bar.max_value = get_total_points_for_next_level() - - #level up + + # Level up if inventory.points >= (get_total_points_for_next_level()): inventory.points -= get_total_points_for_next_level() status.level += 1