extends Area3D class_name Interactable3D @export var interactable := true : set = set_interactable @export var inspectable := false signal clicked @export var hover_animation_player : AnimationPlayer @export var audio_player : AudioStreamPlayer3D func _ready(): set_interactable() func click(): if interactable: clicked.emit() func play_audio(): if audio_player: audio_player.play() func stop_audio(): if audio_player: audio_player.stop() func _on_mouse_entered(): if hover_animation_player and interactable and hover_animation_player.has_animation("hover"): hover_animation_player.play("hover") if inspectable: Pointer.inspect(self) func _on_mouse_exited(): if hover_animation_player: hover_animation_player.stop() if inspectable: Pointer.stop_inspect(self) func card_info() -> CardInfo: return null func set_interactable(i := interactable): interactable = i if is_node_ready() and hover_animation_player: if i and hover_animation_player.has_animation("activated"): hover_animation_player.play("activated") if not i and hover_animation_player.has_animation("deactivated"): hover_animation_player.play("deactivated")