mtd/Scripts/interact_button.gd

12 lines
340 B
GDScript3
Raw Normal View History

2024-02-22 06:22:22 +11:00
class_name InteractButton extends StaticBody3D
signal button_interacted(value: int, callback: Hero)
2024-02-22 06:22:22 +11:00
@export var button_press_value: int = 0
@export var press_cost: int = 0
@export var hover_text: String = "#Interact# to [do thing]"
2024-02-22 06:22:22 +11:00
func press(callback_player: Hero) -> void:
button_interacted.emit(button_press_value, callback_player)