summaryrefslogtreecommitdiff
path: root/Scenes/Entities/Objects/Button.gd
blob: f028440b2cdb286e9b199c0b627cd0f69365dc64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
extends Area2D


signal pressed

var is_pressed: bool = false


func _on_body_entered(body):
	if body is Player and not is_pressed:
		is_pressed = true
		$AnimatedSprite2D.play("pressed")
		emit_signal("pressed")