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 | |
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')
-rw-r--r-- | static/door/door.gd | 10 | ||||
-rw-r--r-- | static/door/door.png | bin | 0 -> 2853 bytes | |||
-rw-r--r-- | static/door/door.png.import | 35 | ||||
-rw-r--r-- | static/door/door.tscn | 65 | ||||
-rw-r--r-- | static/left.png | bin | 0 -> 235 bytes | |||
-rw-r--r-- | static/left.png.import | 35 | ||||
-rw-r--r-- | static/x.png | bin | 0 -> 234 bytes | |||
-rw-r--r-- | static/x.png.import | 35 |
8 files changed, 180 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") diff --git a/static/door/door.png b/static/door/door.png Binary files differnew file mode 100644 index 0000000..2292efe --- /dev/null +++ b/static/door/door.png diff --git a/static/door/door.png.import b/static/door/door.png.import new file mode 100644 index 0000000..95b3e07 --- /dev/null +++ b/static/door/door.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/door.png-5d517bf8d15491aeda1cf3ab4a2489c5.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://static/door/door.png" +dest_files=[ "res://.import/door.png-5d517bf8d15491aeda1cf3ab4a2489c5.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/static/door/door.tscn b/static/door/door.tscn new file mode 100644 index 0000000..e504e2d --- /dev/null +++ b/static/door/door.tscn @@ -0,0 +1,65 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://static/door/door.png" type="Texture" id=1] +[ext_resource path="res://static/door/door.gd" type="Script" id=2] +[ext_resource path="res://sfx/door_open.wav" type="AudioStream" id=3] + +[sub_resource type="Animation" id=1] +length = 0.001 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0 ] +} + +[sub_resource type="Animation" id=2] +resource_name = "closed" +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 1 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 0 ] +} + +[sub_resource type="Animation" id=3] +resource_name = "open" +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ), +"transitions": PoolRealArray( 1, 1, 1, 1 ), +"update": 1, +"values": [ 0, 1, 2, 3 ] +} + +[node name="Door" type="Node2D"] +script = ExtResource( 2 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) +hframes = 5 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +anims/RESET = SubResource( 1 ) +anims/closed = SubResource( 2 ) +anims/open = SubResource( 3 ) + +[node name="door_opened" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 3 ) diff --git a/static/left.png b/static/left.png Binary files differnew file mode 100644 index 0000000..29bf54a --- /dev/null +++ b/static/left.png diff --git a/static/left.png.import b/static/left.png.import new file mode 100644 index 0000000..cd91898 --- /dev/null +++ b/static/left.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/left.png-74bbf33828a4b134e6d58e317f953292.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://static/left.png" +dest_files=[ "res://.import/left.png-74bbf33828a4b134e6d58e317f953292.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/static/x.png b/static/x.png Binary files differnew file mode 100644 index 0000000..a136bd7 --- /dev/null +++ b/static/x.png diff --git a/static/x.png.import b/static/x.png.import new file mode 100644 index 0000000..b98a38a --- /dev/null +++ b/static/x.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/x.png-bb4069b3be26433a9f1a700ec612b871.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://static/x.png" +dest_files=[ "res://.import/x.png-bb4069b3be26433a9f1a700ec612b871.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 |