add essence and magic table

This commit is contained in:
2026-04-22 23:14:43 +03:00
parent 297233c48e
commit 5f5f0f54f1
10 changed files with 243 additions and 3 deletions
+25
View File
@@ -0,0 +1,25 @@
extends Node3D
@onready var tooltip: Label3D = $Tooltip
@onready var mesh_node: MeshInstance3D = $SphereMesh
func _ready() -> void:
add_to_group("interactable")
tooltip.visible = false
var tw := create_tween().set_loops()
tw.tween_property(self, "position:y", 0.7, 0.9)
tw.tween_property(self, "position:y", 0.3, 0.9)
func _process(delta: float) -> void:
rotation.y += delta * 1.8
mesh_node.rotation.x += delta * 0.9
var players := get_tree().get_nodes_in_group("player")
if players.is_empty():
tooltip.visible = false
return
var p := players[0] as Node3D
tooltip.visible = p != null and global_position.distance_to(p.global_position) < 2.5
func interact(player: Node) -> void:
player.call("apply_upgrade_enchant")
queue_free()