From 77b9080c3b375b44b0cd830fe31bf60480c85619 Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Mon, 18 Apr 2022 01:21:58 +0530 Subject: Player Animation converted to Animation Tree Level 1 Design Door Mechanism Core Gameplay Mechanism - In-Progress --- static/door/door.gd | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 static/door/door.gd (limited to 'static/door/door.gd') 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") -- cgit v1.2.3