diff options
Diffstat (limited to 'static/door/door.gd')
-rw-r--r-- | static/door/door.gd | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/static/door/door.gd b/static/door/door.gd new file mode 100644 index 0000000..e4580c7 --- /dev/null +++ b/static/door/door.gd @@ -0,0 +1,10 @@ +extends Node2D +var is_opened = false +func _open_level_door(should_open): + if should_open and !is_opened: + is_opened = true + $door_opened.play() + $AnimationPlayer.play("open") + +func _ready(): + SignalBus.connect("open_level_door",self,"_open_level_door") |