Updated consumer with text
This commit is contained in:
2026-06-14 22:20:55 -06:00
parent 8bf6b14446
commit 96fa6d3c62
3 changed files with 1 additions and 4 deletions
+1 -2
View File
@@ -8,6 +8,7 @@ BORDER = 2
SIZE = 3
HOVER_TIME = 500 # ms
# This actually should be stored somewhere else. This is the goals/quests for the game
TASKS = [
"Collect 10 1's"
]
@@ -29,7 +30,6 @@ class Consumer
@task_index = 0
@tooltip_timer = 0
@tooltip = DialougeBox.new(@x, @y, WIDTH, HEIGHT, TASKS[@task_index])
puts 'made tooltip for consumer'
end
# Consumes numbers created
@@ -43,7 +43,6 @@ class Consumer
@camera_zoom = camera_zoom
if 0 < mouse_x - @draw_x && mouse_x - @draw_x < (SIZE * @box_size * @camera_zoom) && 0 < mouse_y - @draw_y && mouse_y - @draw_y < (SIZE * @box_size * @camera_zoom)
@tooltip_timer += 60.0 * delta_mult
puts @tooltip_timer
if @tooltip_timer > HOVER_TIME
@tooltip.show = true
@tooltip.update(@draw_x, @draw_y, @camera_zoom)