diff options
author | Indrajith K L | 2022-04-18 01:21:58 +0530 |
---|---|---|
committer | Indrajith K L | 2022-04-18 01:21:58 +0530 |
commit | 77b9080c3b375b44b0cd830fe31bf60480c85619 (patch) | |
tree | 986583402ff6c3517fbe04a7f172c346713bb1e8 /static/door/door.gd | |
parent | 31089507aae1d35d0deeb2c412cfa311e7a57563 (diff) | |
download | gamedevjs-jam-77b9080c3b375b44b0cd830fe31bf60480c85619.tar.gz gamedevjs-jam-77b9080c3b375b44b0cd830fe31bf60480c85619.tar.bz2 gamedevjs-jam-77b9080c3b375b44b0cd830fe31bf60480c85619.zip |
Player Animation converted to Animation Tree
Level 1 Design
Door Mechanism
Core Gameplay Mechanism - In-Progress
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") |