Fix comments

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

View File

@ -19,7 +19,7 @@ var status = {
var current_tool = "none" 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 return status.level*10
func change_tool(tool): func change_tool(tool):
@ -28,7 +28,7 @@ func change_tool(tool):
$body_pivot/body/tool.position = game_data.tools[tool].offset $body_pivot/body/tool.position = game_data.tools[tool].offset
func _ready(): 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): func _physics_process(delta):
var pre_velocity = Vector2(0, 0) var pre_velocity = Vector2(0, 0)
@ -48,19 +48,19 @@ func _process(delta):
inventory.points += 1 inventory.points += 1
hit_object.get_node("animation").play("hit") hit_object.get_node("animation").play("hit")
#update inventory HUD # Update inventory HUD
$hud/inventory/stone_label.text = str(inventory.stone) $hud/inventory/stone_label.text = str(inventory.stone)
$hud/inventory/wood_label.text = str(inventory.wood) $hud/inventory/wood_label.text = str(inventory.wood)
$hud/level/points.text = str(inventory.points) + "/" + str(get_total_points_for_next_level()) $hud/level/points.text = str(inventory.points) + "/" + str(get_total_points_for_next_level())
$hud/level/level_bar.value = inventory.points $hud/level/level_bar.value = inventory.points
#update status HUD # Update status HUD
$hud/bars/health.value = status.health $hud/bars/health.value = status.health
$hud/bars/stamina.value = status.stamina $hud/bars/stamina.value = status.stamina
$hud/level/level.text = "Level " + str(status.level) $hud/level/level.text = "Level " + str(status.level)
$hud/level/level_bar.max_value = get_total_points_for_next_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()): if inventory.points >= (get_total_points_for_next_level()):
inventory.points -= get_total_points_for_next_level() inventory.points -= get_total_points_for_next_level()
status.level += 1 status.level += 1