* animate slime faster

* show loot text above head much closer to head
This commit is contained in:
2026-01-11 04:32:42 +01:00
parent a43a17ed10
commit 464f499b36
7 changed files with 160 additions and 80 deletions

View File

@@ -381,7 +381,7 @@ func _process_pickup_on_server(player: Node):
player.heal(heal_amount)
# Show floating text with item graphic and heal amount
var items_texture = load("res://assets/gfx/pickups/items_n_shit.png")
_show_floating_text(player, "+" + str(int(actual_heal)) + " HP", Color.GREEN, 0.5, 0.5, items_texture, 20, 14, (8 * 20) + 11)
_show_floating_text(player, "+" + str(int(actual_heal)) + " HP", Color.GREEN, 0.5, 0.5, items_texture, 20, 14, (8 * 20) + 10)
self.visible = false
@@ -399,7 +399,7 @@ func _process_pickup_on_server(player: Node):
player.heal(heal_amount)
# Show floating text with item graphic and heal amount
var items_texture = load("res://assets/gfx/pickups/items_n_shit.png")
_show_floating_text(player, "+" + str(int(actual_heal)) + " HP", Color.GREEN, 0.5, 0.5, items_texture, 20, 14, (8 * 20) + 12)
_show_floating_text(player, "+" + str(int(actual_heal)) + " HP", Color.GREEN, 0.5, 0.5, items_texture, 20, 14, (8 * 20) + 11)
self.visible = false
@@ -417,7 +417,7 @@ func _process_pickup_on_server(player: Node):
player.heal(heal_amount)
# Show floating text with item graphic and heal amount
var items_texture = load("res://assets/gfx/pickups/items_n_shit.png")
_show_floating_text(player, "+" + str(int(actual_heal)) + " HP", Color.GREEN, 0.5, 0.5, items_texture, 20, 14, (8 * 20) + 13)
_show_floating_text(player, "+" + str(int(actual_heal)) + " HP", Color.GREEN, 0.5, 0.5, items_texture, 20, 14, (8 * 20) + 12)
self.visible = false
@@ -545,5 +545,5 @@ func _show_floating_text(player: Node, text: String, color: Color, show_time: fl
var parent = player.get_parent()
if parent:
parent.add_child(floating_text)
floating_text.global_position = player.global_position + Vector2(0, -20)
floating_text.global_position = Vector2(player.global_position.x, player.global_position.y)
floating_text.setup(text, color, show_time, fade_time, item_texture, sprite_hframes, sprite_vframes, sprite_frame)