breadwinner/entities/usable/button/button_3d.gd

10 lines
189 B
GDScript3
Raw Permalink Normal View History

class_name Button3D extends StaticBody3D
@onready var animation_player: AnimationPlayer = %AnimationPlayer
signal pressed
func press():
animation_player.play("pressed")
pressed.emit()