2024-02-22 06:22:22 +11:00
|
|
|
class_name InteractButton extends StaticBody3D
|
2023-11-08 14:28:55 +11:00
|
|
|
|
2024-03-29 21:58:40 +11:00
|
|
|
signal button_interacted(value: int, callback: Hero)
|
2023-11-08 14:28:55 +11:00
|
|
|
|
2024-02-22 06:22:22 +11:00
|
|
|
@export var button_press_value: int = 0
|
|
|
|
@export var press_cost: int = 0
|
2024-03-31 19:32:00 +11:00
|
|
|
@export var hover_text: String = "#Interact# to [do thing]"
|
2023-11-08 14:28:55 +11:00
|
|
|
|
2024-02-22 06:22:22 +11:00
|
|
|
|
2024-03-29 21:58:40 +11:00
|
|
|
func press(callback_player: Hero) -> void:
|
|
|
|
button_interacted.emit(button_press_value, callback_player)
|