feat: implemented interaction tooltips

This commit is contained in:
Sara 2025-08-11 15:33:31 +02:00
parent 34db607145
commit 2511ac69c0
7 changed files with 44 additions and 15 deletions

View file

@ -16,6 +16,11 @@
[sub_resource type="GDScript" id="GDScript_ug5on"]
script/source = "extends Interactable
func _highlight_changed(_interactor: PlayerInteractor, value: bool) -> void:
var hud = HeadsUpDisplay.get_singleton()
if hud:
hud.set_tooltip(\"Demolish with demo pack\" if value else \"\")
func _activated(interactor):
if interactor.try_use_demo_pack():
get_parent().queue_free()
@ -127,6 +132,9 @@ size = Vector3(5.24, 4.325, 8.29)
[node name="IndustrialAreaMap" type="Node3D"]
[node name="DemoPackPickup" parent="." instance=ExtResource("11_foo0w")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.609407, 0.8542257, 2.3071413)
[node name="DestructableGate1" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18.062351, 2.0328617, 5.9408145)
use_collision = true
@ -788,9 +796,6 @@ collision_layer = 3
mesh = SubResource("PrismMesh_foo0w")
material = ExtResource("4_fwhga")
[node name="DemoPackPickup" parent="Map" instance=ExtResource("11_foo0w")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.609407, 0.8542257, 2.3071413)
[node name="BrokenGate" type="CSGBox3D" parent="Map"]
transform = Transform3D(0.9117334, 0.41078255, -2.3283064e-10, 0.0033696396, -0.0074789287, -0.9999664, -0.41076872, 0.91170275, -0.0082029775, -9.67504, 0.1504199, 7.5122595)
use_collision = true