Fix comments

This commit is contained in:
2024-03-29 18:12:59 -07:00
parent 6f648dcc15
commit daf6e69f60

View File

@ -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)
@ -48,19 +48,19 @@ func _process(delta):
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