diff --git a/client/.import/elevator-button-color.png-fe767a41ebb2e92445e76edbb2e18f7a.md5 b/client/.import/elevator-button-color.png-fe767a41ebb2e92445e76edbb2e18f7a.md5 new file mode 100644 index 0000000..5af58b3 --- /dev/null +++ b/client/.import/elevator-button-color.png-fe767a41ebb2e92445e76edbb2e18f7a.md5 @@ -0,0 +1,3 @@ +source_md5="ac15d19b18183939f2cb938b48b83391" +dest_md5="0983b74d7b93c756eb0c5a98b4157abd" + diff --git a/client/.import/elevator-button-color.png-fe767a41ebb2e92445e76edbb2e18f7a.stex b/client/.import/elevator-button-color.png-fe767a41ebb2e92445e76edbb2e18f7a.stex new file mode 100644 index 0000000..8d5bdf1 Binary files /dev/null and b/client/.import/elevator-button-color.png-fe767a41ebb2e92445e76edbb2e18f7a.stex differ diff --git a/client/.import/elevator-button.png-77644fd41dc75c8e32a225dd140c8b38.md5 b/client/.import/elevator-button.png-77644fd41dc75c8e32a225dd140c8b38.md5 new file mode 100644 index 0000000..7a3877d --- /dev/null +++ b/client/.import/elevator-button.png-77644fd41dc75c8e32a225dd140c8b38.md5 @@ -0,0 +1,3 @@ +source_md5="240c53764197402a0c89fe8fb8b2a878" +dest_md5="de36b355f43d62393cda8f9c25ab30ad" + diff --git a/client/.import/elevator-button.png-77644fd41dc75c8e32a225dd140c8b38.stex b/client/.import/elevator-button.png-77644fd41dc75c8e32a225dd140c8b38.stex new file mode 100644 index 0000000..c0e0a56 Binary files /dev/null and b/client/.import/elevator-button.png-77644fd41dc75c8e32a225dd140c8b38.stex differ diff --git a/client/.import/elevator-door.png-c8a525f29a53c56da780c1ade7c02552.md5 b/client/.import/elevator-door.png-c8a525f29a53c56da780c1ade7c02552.md5 new file mode 100644 index 0000000..21793aa --- /dev/null +++ b/client/.import/elevator-door.png-c8a525f29a53c56da780c1ade7c02552.md5 @@ -0,0 +1,3 @@ +source_md5="a43d1da157f5981d7d307fa0f05c7144" +dest_md5="de067c565a3ab4762ae06714e45fe0ae" + diff --git a/client/.import/elevator-door.png-c8a525f29a53c56da780c1ade7c02552.stex b/client/.import/elevator-door.png-c8a525f29a53c56da780c1ade7c02552.stex new file mode 100644 index 0000000..bc6e487 Binary files /dev/null and b/client/.import/elevator-door.png-c8a525f29a53c56da780c1ade7c02552.stex differ diff --git a/client/.import/elevator.png-6104b47e90854ba939097ca22c392814.md5 b/client/.import/elevator.png-6104b47e90854ba939097ca22c392814.md5 new file mode 100644 index 0000000..51835b4 --- /dev/null +++ b/client/.import/elevator.png-6104b47e90854ba939097ca22c392814.md5 @@ -0,0 +1,3 @@ +source_md5="3cacd4765fc525e57c7258a4805508e6" +dest_md5="2dab7bdfa7f0fc281860167c39ed10b6" + diff --git a/client/.import/elevator.png-6104b47e90854ba939097ca22c392814.stex b/client/.import/elevator.png-6104b47e90854ba939097ca22c392814.stex new file mode 100644 index 0000000..8722869 Binary files /dev/null and b/client/.import/elevator.png-6104b47e90854ba939097ca22c392814.stex differ diff --git a/client/Assets/Art/Objects/elevator/elevator-button-color.png b/client/Assets/Art/Objects/elevator/elevator-button-color.png new file mode 100644 index 0000000..d1ce63a Binary files /dev/null and b/client/Assets/Art/Objects/elevator/elevator-button-color.png differ diff --git a/client/Assets/Art/Objects/elevator/elevator-button-color.png.import b/client/Assets/Art/Objects/elevator/elevator-button-color.png.import new file mode 100644 index 0000000..2349020 --- /dev/null +++ b/client/Assets/Art/Objects/elevator/elevator-button-color.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/elevator-button-color.png-fe767a41ebb2e92445e76edbb2e18f7a.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Art/Objects/elevator/elevator-button-color.png" +dest_files=[ "res://.import/elevator-button-color.png-fe767a41ebb2e92445e76edbb2e18f7a.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/client/Assets/Art/Objects/elevator/elevator-button.aseprite b/client/Assets/Art/Objects/elevator/elevator-button.aseprite new file mode 100644 index 0000000..f68ddcc Binary files /dev/null and b/client/Assets/Art/Objects/elevator/elevator-button.aseprite differ diff --git a/client/Assets/Art/Objects/elevator/elevator-button.png b/client/Assets/Art/Objects/elevator/elevator-button.png new file mode 100644 index 0000000..9623bc2 Binary files /dev/null and b/client/Assets/Art/Objects/elevator/elevator-button.png differ diff --git a/client/Assets/Art/Objects/elevator/elevator-button.png.import b/client/Assets/Art/Objects/elevator/elevator-button.png.import new file mode 100644 index 0000000..b5f4c32 --- /dev/null +++ b/client/Assets/Art/Objects/elevator/elevator-button.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/elevator-button.png-77644fd41dc75c8e32a225dd140c8b38.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Art/Objects/elevator/elevator-button.png" +dest_files=[ "res://.import/elevator-button.png-77644fd41dc75c8e32a225dd140c8b38.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/client/Assets/Art/Objects/elevator/elevator-door.aseprite b/client/Assets/Art/Objects/elevator/elevator-door.aseprite new file mode 100644 index 0000000..d3c04ad Binary files /dev/null and b/client/Assets/Art/Objects/elevator/elevator-door.aseprite differ diff --git a/client/Assets/Art/Objects/elevator/elevator-door.png b/client/Assets/Art/Objects/elevator/elevator-door.png new file mode 100644 index 0000000..0786a4e Binary files /dev/null and b/client/Assets/Art/Objects/elevator/elevator-door.png differ diff --git a/client/Assets/Art/Objects/elevator/elevator-door.png.import b/client/Assets/Art/Objects/elevator/elevator-door.png.import new file mode 100644 index 0000000..93ca8df --- /dev/null +++ b/client/Assets/Art/Objects/elevator/elevator-door.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/elevator-door.png-c8a525f29a53c56da780c1ade7c02552.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Art/Objects/elevator/elevator-door.png" +dest_files=[ "res://.import/elevator-door.png-c8a525f29a53c56da780c1ade7c02552.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/client/Assets/Art/Objects/elevator/elevator.aseprite b/client/Assets/Art/Objects/elevator/elevator.aseprite new file mode 100644 index 0000000..5965d0d Binary files /dev/null and b/client/Assets/Art/Objects/elevator/elevator.aseprite differ diff --git a/client/Assets/Art/Objects/elevator/elevator.png b/client/Assets/Art/Objects/elevator/elevator.png new file mode 100644 index 0000000..46b175d Binary files /dev/null and b/client/Assets/Art/Objects/elevator/elevator.png differ diff --git a/client/Assets/Art/Objects/elevator/elevator.png.import b/client/Assets/Art/Objects/elevator/elevator.png.import new file mode 100644 index 0000000..18abc34 --- /dev/null +++ b/client/Assets/Art/Objects/elevator/elevator.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/elevator.png-6104b47e90854ba939097ca22c392814.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Art/Objects/elevator/elevator.png" +dest_files=[ "res://.import/elevator.png-6104b47e90854ba939097ca22c392814.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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/client/Nodes/Door.tscn b/client/Nodes/Door.tscn index 35ca62c..381f3d3 100644 --- a/client/Nodes/Door.tscn +++ b/client/Nodes/Door.tscn @@ -5,31 +5,28 @@ [ext_resource path="res://Scripts/Entities/Door.gd" type="Script" id=3] [ext_resource path="res://Assets/Art/32x32mask.png" type="Texture" id=5] - - -[sub_resource type="RectangleShape2D" id=7] +[sub_resource type="RectangleShape2D" id=1] extents = Vector2( 16.0007, 15.9043 ) -[sub_resource type="AtlasTexture" id=1] -atlas = ExtResource( 1 ) -region = Rect2( 0, 0, 32, 32 ) - -[sub_resource type="OccluderPolygon2D" id=8] -polygon = PoolVector2Array( -5, 18, -5, 0, -2, 0, -2, 4, 2, 4, 2, 0, 5, 0, 5, 18 ) - [sub_resource type="AtlasTexture" id=2] atlas = ExtResource( 1 ) +region = Rect2( 0, 0, 32, 32 ) + +[sub_resource type="OccluderPolygon2D" id=3] +polygon = PoolVector2Array( -5, 18, -5, 0, -2, 0, -2, 4, 2, 4, 2, 0, 5, 0, 5, 18 ) + +[sub_resource type="AtlasTexture" id=4] +atlas = ExtResource( 1 ) region = Rect2( 0, 32, 32, 32 ) -[sub_resource type="AtlasTexture" id=3] +[sub_resource type="AtlasTexture" id=5] atlas = ExtResource( 1 ) region = Rect2( 0, 64, 32, 32 ) -[sub_resource type="OccluderPolygon2D" id=9] +[sub_resource type="OccluderPolygon2D" id=6] polygon = PoolVector2Array( 5, -18, 5, 0, -5, 0, -5, -18 ) -[sub_resource type="Animation" id=5] -resource_name = "Close" +[sub_resource type="Animation" id=7] length = 0.5 tracks/0/type = "bezier" tracks/0/path = NodePath("Top:position:x") @@ -92,8 +89,7 @@ tracks/5/keys = { "times": PoolRealArray( 0, 0.5 ) } -[sub_resource type="Animation" id=4] -resource_name = "Open" +[sub_resource type="Animation" id=8] length = 0.5 tracks/0/type = "bezier" tracks/0/path = NodePath("Bottom:position:x") @@ -156,7 +152,7 @@ tracks/5/keys = { "times": PoolRealArray( 0, 0.5 ) } -[sub_resource type="RectangleShape2D" id=6] +[sub_resource type="RectangleShape2D" id=9] extents = Vector2( 40.2987, 16.0621 ) [node name="Door" type="Area2D"] @@ -165,31 +161,31 @@ script = ExtResource( 3 ) [node name="StaticBody2D" type="StaticBody2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"] -shape = SubResource( 7 ) +shape = SubResource( 1 ) [node name="Bottom" type="Sprite" parent="."] z_index = 25 -texture = SubResource( 1 ) +texture = SubResource( 2 ) [node name="LightOccluder2D" type="LightOccluder2D" parent="Bottom"] -occluder = SubResource( 8 ) +occluder = SubResource( 3 ) [node name="Top" type="Sprite" parent="."] z_index = 25 -texture = SubResource( 2 ) +texture = SubResource( 4 ) [node name="Color" type="Sprite" parent="Top"] -texture = SubResource( 3 ) +texture = SubResource( 5 ) [node name="LightOccluder2D" type="LightOccluder2D" parent="Top"] -occluder = SubResource( 9 ) +occluder = SubResource( 6 ) [node name="AnimationPlayer" type="AnimationPlayer" parent="."] -anims/Close = SubResource( 5 ) -anims/Open = SubResource( 4 ) +anims/Close = SubResource( 7 ) +anims/Open = SubResource( 8 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource( 6 ) +shape = SubResource( 9 ) [node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."] stream = ExtResource( 2 ) diff --git a/client/Nodes/Elevator.tscn b/client/Nodes/Elevator.tscn new file mode 100644 index 0000000..95db94d --- /dev/null +++ b/client/Nodes/Elevator.tscn @@ -0,0 +1,42 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://Assets/Art/Objects/elevator/elevator.png" type="Texture" id=1] +[ext_resource path="res://Scripts/Entities/Elevator.gd" type="Script" id=2] +[ext_resource path="res://Scripts/Component/ElevatorControls.gd" type="Script" id=3] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 16, 2 ) + +[sub_resource type="RectangleShape2D" id=2] +extents = Vector2( 10, 16 ) + +[node name="Elevator" type="Node2D"] +script = ExtResource( 2 ) +__meta__ = { +"_edit_group_": true +} + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) + +[node name="Bottom" type="StaticBody2D" parent="."] +position = Vector2( 0, 18 ) +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Bottom"] +shape = SubResource( 1 ) + +[node name="Top" type="StaticBody2D" parent="."] +position = Vector2( 0, -18 ) +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Top"] +shape = SubResource( 1 ) + +[node name="ElevatorControls" type="Area2D" parent="."] +script = ExtResource( 3 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="ElevatorControls"] +shape = SubResource( 2 ) diff --git a/client/Nodes/ElevatorButton.tscn b/client/Nodes/ElevatorButton.tscn new file mode 100644 index 0000000..e06c9bb --- /dev/null +++ b/client/Nodes/ElevatorButton.tscn @@ -0,0 +1,67 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://Assets/Art/Objects/elevator/elevator-button-color.png" type="Texture" id=1] +[ext_resource path="res://Scripts/Entities/ElevatorButton.gd" type="Script" id=2] +[ext_resource path="res://Assets/Art/Objects/elevator/elevator-button.png" type="Texture" id=3] + +[sub_resource type="AtlasTexture" id=1] +atlas = ExtResource( 3 ) +region = Rect2( 0, 0, 16, 8 ) + +[sub_resource type="CircleShape2D" id=2] +radius = 16.0 + +[sub_resource type="Animation" id=3] +resource_name = "Done" +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": 1, +"values": [ 1 ] +} + +[sub_resource type="Animation" id=4] +resource_name = "Waiting" +length = 0.4 +loop = true +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.2 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 1, +"values": [ 1, 0 ] +} + +[node name="ElevatorButton" type="Area2D"] +script = ExtResource( 2 ) +__meta__ = { +"_edit_group_": true +} + +[node name="Sprite" type="Sprite" parent="."] +texture = SubResource( 1 ) +hframes = 2 +frame = 1 + +[node name="Color" type="Sprite" parent="."] +modulate = Color( 0.0941176, 1, 0.14902, 1 ) +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource( 2 ) + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +anims/Done = SubResource( 3 ) +anims/Waiting = SubResource( 4 ) diff --git a/client/Nodes/ElevatorDoor.tscn b/client/Nodes/ElevatorDoor.tscn new file mode 100644 index 0000000..c296cb3 --- /dev/null +++ b/client/Nodes/ElevatorDoor.tscn @@ -0,0 +1,174 @@ +[gd_scene load_steps=9 format=2] + +[ext_resource path="res://Assets/Art/Objects/elevator/elevator-door.png" type="Texture" id=1] +[ext_resource path="res://Assets/Sfx/door.wav" type="AudioStream" id=2] +[ext_resource path="res://Scripts/Entities/ElevatorDoor.gd" type="Script" id=3] +[ext_resource path="res://Assets/Art/32x32mask.png" type="Texture" id=5] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 1.65761, 15.9043 ) + +[sub_resource type="Animation" id=7] +length = 0.3 +tracks/0/type = "bezier" +tracks/0/path = NodePath("Top:position:x") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"points": PoolRealArray( 0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0 ), +"times": PoolRealArray( 0, 0.3 ) +} +tracks/1/type = "bezier" +tracks/1/path = NodePath("Top:position:y") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"points": PoolRealArray( -24, -0.25, 0, 0.25, 0, -8, -0.25, 0, 0.25, 0 ), +"times": PoolRealArray( 0, 0.3 ) +} +tracks/2/type = "bezier" +tracks/2/path = NodePath("Top:rotation_degrees") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"points": PoolRealArray( 0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0 ), +"times": PoolRealArray( 0, 0.3 ) +} +tracks/3/type = "bezier" +tracks/3/path = NodePath("Bottom:position:x") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"points": PoolRealArray( 0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0 ), +"times": PoolRealArray( 0, 0.3 ) +} +tracks/4/type = "bezier" +tracks/4/path = NodePath("Bottom:position:y") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/keys = { +"points": PoolRealArray( 24, -0.25, 0, 0.25, 0, 8, -0.25, 0, 0.25, 0 ), +"times": PoolRealArray( 0, 0.3 ) +} +tracks/5/type = "bezier" +tracks/5/path = NodePath("Bottom:rotation_degrees") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/keys = { +"points": PoolRealArray( 0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0 ), +"times": PoolRealArray( 0, 0.3 ) +} + +[sub_resource type="Animation" id=8] +length = 0.3 +tracks/0/type = "bezier" +tracks/0/path = NodePath("Bottom:position:x") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"points": PoolRealArray( 0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0 ), +"times": PoolRealArray( 0, 0.3 ) +} +tracks/1/type = "bezier" +tracks/1/path = NodePath("Bottom:position:y") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"points": PoolRealArray( 8, -0.25, 0, 0.25, 0, 24, -0.25, 0, 0.25, 0 ), +"times": PoolRealArray( 0, 0.3 ) +} +tracks/2/type = "bezier" +tracks/2/path = NodePath("Bottom:rotation_degrees") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"points": PoolRealArray( 0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0 ), +"times": PoolRealArray( 0, 0.3 ) +} +tracks/3/type = "bezier" +tracks/3/path = NodePath("Top:position:x") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"points": PoolRealArray( 0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0 ), +"times": PoolRealArray( 0, 0.3 ) +} +tracks/4/type = "bezier" +tracks/4/path = NodePath("Top:position:y") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/keys = { +"points": PoolRealArray( -8, -0.25, 0, 0.25, 0, -24, -0.25, 0, 0.25, 0 ), +"times": PoolRealArray( 0, 0.3 ) +} +tracks/5/type = "bezier" +tracks/5/path = NodePath("Top:rotation_degrees") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/keys = { +"points": PoolRealArray( 0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0 ), +"times": PoolRealArray( 0, 0.3 ) +} + +[sub_resource type="RectangleShape2D" id=9] +extents = Vector2( 14.4443, 16.0621 ) + +[node name="ElevatorDoor" type="Area2D"] +script = ExtResource( 3 ) + +[node name="StaticBody2D" type="StaticBody2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"] +shape = SubResource( 1 ) + +[node name="Bottom" type="Sprite" parent="."] +position = Vector2( 0, 8 ) +scale = Vector2( 1, -1 ) +z_index = 25 +texture = ExtResource( 1 ) + +[node name="Top" type="Sprite" parent="."] +position = Vector2( 0, -8 ) +z_index = 25 +texture = ExtResource( 1 ) + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +anims/Close = SubResource( 7 ) +anims/Open = SubResource( 8 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource( 9 ) + +[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource( 2 ) +bus = "Sfx" + +[node name="Mask" type="Light2D" parent="."] +enabled = false +texture = ExtResource( 5 ) +mode = 3 +range_item_cull_mask = 2 diff --git a/client/Nodes/GUI.tscn b/client/Nodes/GUI.tscn index dac1307..ec483f0 100644 --- a/client/Nodes/GUI.tscn +++ b/client/Nodes/GUI.tscn @@ -20,6 +20,7 @@ font_data = ExtResource( 5 ) script = ExtResource( 2 ) [node name="Dialog" type="Control" parent="."] +visible = false anchor_left = 0.5 anchor_top = 1.0 anchor_right = 0.5 @@ -99,6 +100,7 @@ margin_bottom = 31.0 text = "Choice" [node name="ZoneLabel" type="Label" parent="."] +visible = false anchor_top = 1.0 anchor_bottom = 1.0 margin_left = 12.0 @@ -113,6 +115,7 @@ __meta__ = { } [node name="Tip" type="Label" parent="."] +visible = false anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 @@ -139,3 +142,30 @@ __meta__ = { "_edit_use_anchors_": false } start_with_fade_in = false + +[node name="ElevatorDialog" type="WindowDialog" parent="."] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -125.5 +margin_top = -132.0 +margin_right = 125.5 +margin_bottom = 132.0 +theme = ExtResource( 1 ) +window_title = "Elevator" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Buttons" type="VBoxContainer" parent="ElevatorDialog"] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 6.0 +margin_top = 6.0 +margin_right = -6.0 +margin_bottom = -6.0 +alignment = 1 +__meta__ = { +"_edit_use_anchors_": false +} diff --git a/client/Nodes/Player.tscn b/client/Nodes/Player.tscn index 0219ac4..0061bb2 100644 --- a/client/Nodes/Player.tscn +++ b/client/Nodes/Player.tscn @@ -1801,6 +1801,8 @@ atlas = ExtResource( 2 ) region = Rect2( 3, 19, 1, 2 ) [node name="Player" type="KinematicBody2D"] +collision_layer = 3 +collision_mask = 3 script = ExtResource( 4 ) [node name="AnimationPlayer" type="AnimationPlayer" parent="."] diff --git a/client/Nodes/Wall Light.tscn b/client/Nodes/Wall Light.tscn index 26cac9b..1ad3f75 100644 --- a/client/Nodes/Wall Light.tscn +++ b/client/Nodes/Wall Light.tscn @@ -5,8 +5,6 @@ [ext_resource path="res://Scripts/Component/LightLoader.gd" type="Script" id=3] [ext_resource path="res://Scripts/Entities/Wall Light.gd" type="Script" id=4] - - [sub_resource type="CircleShape2D" id=1] radius = 200.0 diff --git a/client/Scenes/Dev.tscn b/client/Scenes/Dev.tscn index 15d5c43..ea441a8 100644 --- a/client/Scenes/Dev.tscn +++ b/client/Scenes/Dev.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=2] +[gd_scene load_steps=16 format=2] [ext_resource path="res://Nodes/Tiles/tileset_science_lab.tres" type="TileSet" id=1] [ext_resource path="res://Nodes/NPCs/CEO.tscn" type="PackedScene" id=2] @@ -10,9 +10,12 @@ [ext_resource path="res://Nodes/NPCs/Soldier.tscn" type="PackedScene" id=8] [ext_resource path="res://Scripts/Component/Killbox.gd" type="Script" id=9] [ext_resource path="res://Scripts/Component/Savebox.gd" type="Script" id=10] +[ext_resource path="res://Nodes/Elevator.tscn" type="PackedScene" id=11] +[ext_resource path="res://Nodes/ElevatorDoor.tscn" type="PackedScene" id=12] +[ext_resource path="res://Nodes/ElevatorButton.tscn" type="PackedScene" id=13] [sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 32.0304, 21.0266 ) +extents = Vector2( 1374.82, 21.0266 ) [sub_resource type="RectangleShape2D" id=2] extents = Vector2( 10, 15.1479 ) @@ -23,7 +26,7 @@ extents = Vector2( 10, 15.1479 ) tile_set = ExtResource( 1 ) cell_size = Vector2( 16, 16 ) format = 1 -tile_data = PoolIntArray( 327676, 53, 4, 327677, 53, 196609, 327678, 53, 196609, 327679, 53, 196609, 262144, 53, 7, 393212, 53, 65539, 393213, 52, 0, 393214, 52, 1, 393215, 52, 2, 327680, 53, 65539, 458748, 53, 65539, 458749, 52, 131072, 458750, 52, 131073, 458751, 52, 131074, 393216, 53, 65539, 393217, 49, 0, 393218, 49, 0, 393219, 49, 0, 393220, 49, 0, 393221, 49, 0, 524260, 49, 0, 524261, 49, 0, 524262, 49, 0, 524263, 49, 0, 524264, 49, 0, 524265, 49, 0, 524266, 49, 0, 524267, 49, 0, 524268, 49, 0, 524269, 49, 0, 524270, 49, 0, 524271, 49, 0, 524272, 48, 0, 524273, 48, 0, 524274, 48, 0, 524275, 49, 0, 524276, 49, 0, 524277, 49, 0, 524278, 49, 0, 524279, 49, 0, 524280, 49, 0, 524281, 49, 0, 524282, 49, 0, 524283, 49, 0, 524284, 53, 131075, 524285, 47, 3, 524286, 48, 0, 524287, 47, 3, 458752, 53, 131075, 458753, 49, 0, 458754, 52, 0, 458755, 52, 2, 458756, 49, 0, 458757, 49, 0, 589796, 49, 0, 589797, 49, 0, 589798, 49, 0, 589799, 49, 0, 589800, 49, 0, 589801, 49, 0, 589802, 49, 0, 589803, 49, 0, 589804, 49, 0, 589805, 49, 0, 589806, 49, 0, 589807, 49, 0, 589808, 48, 0, 589809, 49, 0, 589810, 49, 0, 589811, 53, 196608, 589812, 53, 6, 589813, 53, 5, 589814, 53, 196610, 589815, 49, 0, 589816, 49, 0, 589817, 49, 0, 589818, 49, 0, 589819, 49, 0, 589820, 49, 0, 589821, 47, 65539, 589822, 48, 0, 589823, 47, 65539, 524288, 49, 0, 524289, 49, 0, 524290, 52, 65536, 524291, 52, 65538, 524292, 49, 0, 524293, 49, 0, 655332, 49, 0, 655333, 49, 0, 655334, 49, 0, 655335, 49, 0, 655336, 53, 0, 655337, 53, 2, 655338, 49, 0, 655339, 49, 0, 655340, 49, 0, 655341, 49, 0, 655342, 49, 0, 655343, 49, 0, 655344, 48, 0, 655345, 49, 0, 655346, 49, 0, 655347, 49, 0, 655348, 53, 131072, 655349, 53, 131074, 655350, 49, 0, 655351, 49, 0, 655352, 49, 0, 655353, 49, 0, 655354, 49, 0, 655355, 49, 0, 655356, 49, 0, 655357, 47, 131075, 655358, 48, 0, 655359, 47, 131075, 589824, 49, 0, 589825, 49, 0, 589826, 52, 65536, 589827, 52, 65538, 589828, 49, 0, 589829, 49, 0, 720868, 49, 0, 720869, 49, 0, 720870, 49, 0, 720871, 49, 0, 720872, 53, 65536, 720873, 53, 65538, 720874, 49, 0, 720875, 49, 0, 720876, 49, 0, 720877, 49, 0, 720878, 49, 0, 720879, 49, 0, 720880, 48, 0, 720881, 49, 0, 720882, 49, 0, 720883, 49, 0, 720884, 49, 0, 720885, 49, 0, 720886, 49, 0, 720887, 49, 0, 720888, 49, 0, 720889, 49, 0, 720890, 49, 0, 720891, 49, 0, 720892, 49, 0, 720893, 49, 0, 720894, 49, 0, 720895, 49, 0, 655360, 49, 0, 655361, 49, 0, 655362, 52, 131072, 655363, 52, 131074, 655364, 49, 0, 655365, 49, 0, 786404, 53, 0, 786405, 53, 1, 786406, 53, 1, 786407, 53, 1, 786408, 53, 131078, 786409, 53, 131077, 786410, 53, 1, 786411, 53, 1, 786412, 53, 1, 786413, 53, 1, 786414, 53, 1, 786415, 53, 1, 786416, 53, 1, 786417, 53, 1, 786418, 53, 1, 786419, 53, 1, 786420, 53, 1, 786421, 53, 1, 786422, 53, 1, 786423, 53, 1, 786424, 53, 1, 786425, 53, 1, 786426, 53, 1, 786427, 53, 1, 786428, 53, 1, 786429, 53, 1, 786430, 53, 1, 786431, 53, 1, 720896, 53, 2, 720897, 47, 0, 720898, 47, 1, 720899, 47, 1, 720900, 47, 1, 720901, 47, 1, 720902, 47, 1, 720903, 47, 1, 720904, 47, 1, 720905, 47, 1, 720906, 47, 1, 720907, 47, 1, 720908, 47, 1, 720909, 47, 1, 720910, 47, 1, 720911, 47, 1, 720912, 47, 1, 720913, 47, 1, 720914, 47, 1, 720915, 47, 1, 720916, 47, 1, 720917, 47, 1, 720918, 47, 1, 720919, 47, 1, 720920, 47, 1, 720921, 47, 1, 720922, 47, 1, 720923, 47, 1, 720924, 47, 1, 720925, 47, 1, 720926, 47, 1, 720927, 47, 2, 851940, 53, 65536, 851941, 53, 65537, 851942, 53, 65537, 851943, 53, 65537, 851944, 53, 65537, 851945, 53, 65537, 851946, 53, 65537, 851947, 53, 65537, 851948, 53, 65537, 851949, 53, 65537, 851950, 53, 65537, 851951, 53, 65537, 851952, 53, 65537, 851953, 53, 65537, 851954, 53, 65537, 851955, 53, 65537, 851956, 53, 65537, 851957, 53, 65537, 851958, 53, 65537, 851959, 53, 65537, 851960, 53, 65537, 851961, 53, 65537, 851962, 53, 65537, 851963, 53, 65537, 851964, 53, 65537, 851965, 53, 65537, 851966, 53, 65537, 851967, 53, 65537, 786432, 53, 65538, 786433, 47, 65536, 786434, 47, 65537, 786435, 47, 65537, 786436, 47, 65537, 786437, 47, 65537, 786438, 47, 65537, 786439, 47, 65537, 786440, 47, 65537, 786441, 47, 65537, 786442, 47, 65537, 786443, 47, 65537, 786444, 47, 65537, 786445, 47, 65537, 786446, 47, 65537, 786447, 47, 65537, 786448, 47, 65537, 786449, 47, 65537, 786450, 47, 65537, 786451, 47, 65537, 786452, 47, 65537, 786453, 47, 65537, 786454, 47, 65537, 786455, 47, 65537, 786456, 47, 65537, 786457, 47, 65537, 786458, 47, 65537, 786459, 47, 65537, 786460, 47, 65537, 786461, 47, 65537, 786462, 47, 65537, 786463, 47, 65538, 917476, 53, 131072, 917477, 53, 131073, 917478, 53, 131073, 917479, 53, 131073, 917480, 53, 131073, 917481, 53, 131073, 917482, 53, 131073, 917483, 53, 131073, 917484, 53, 131073, 917485, 53, 131073, 917486, 53, 131073, 917487, 53, 131073, 917488, 53, 131073, 917489, 53, 131073, 917490, 53, 131073, 917491, 53, 131073, 917492, 53, 131073, 917493, 53, 131073, 917494, 53, 131073, 917495, 53, 131073, 917496, 53, 131073, 917497, 53, 131073, 917498, 53, 131073, 917499, 53, 131073, 917500, 53, 131073, 917501, 53, 131073, 917502, 53, 131073, 917503, 53, 131073, 851968, 53, 131074, 851969, 47, 131072, 851970, 47, 131073, 851971, 47, 131073, 851972, 47, 131073, 851973, 47, 131073, 851974, 47, 131073, 851975, 47, 131073, 851976, 47, 131073, 851977, 47, 131073, 851978, 47, 131073, 851979, 47, 131073, 851980, 47, 131073, 851981, 47, 131073, 851982, 47, 131073, 851983, 47, 131073, 851984, 47, 131073, 851985, 47, 131073, 851986, 47, 131073, 851987, 47, 131073, 851988, 47, 131073, 851989, 47, 131073, 851990, 47, 131073, 851991, 47, 131073, 851992, 47, 131073, 851993, 47, 131073, 851994, 47, 131073, 851995, 47, 131073, 851996, 47, 131073, 851997, 47, 131073, 851998, 47, 131073, 851999, 47, 131074 ) +tile_data = PoolIntArray( 196578, 49, 0, 196579, 49, 0, 262114, 52, 0, 262115, 52, 2, 327639, 47, 4, 327640, 47, 196609, 327641, 47, 196609, 327642, 47, 196609, 327643, 47, 196609, 327644, 47, 196609, 327645, 47, 196609, 327646, 47, 196609, 327647, 47, 196609, 327648, 47, 196609, 327649, 47, 7, 327650, 52, 65536, 327651, 52, 65538, 327652, 47, 4, 327653, 47, 196609, 327654, 47, 196609, 327655, 47, 196609, 327656, 47, 196609, 327657, 47, 196609, 327658, 47, 196609, 327659, 47, 196609, 327660, 47, 196609, 327661, 47, 196609, 327662, 47, 196609, 327663, 47, 196610, 327664, 53, 196608, 327665, 53, 196609, 327666, 53, 196609, 327667, 53, 196609, 327668, 53, 196609, 327669, 53, 196609, 327670, 53, 196609, 327671, 53, 196609, 327672, 53, 196609, 327673, 53, 196609, 327674, 53, 196609, 327675, 53, 196609, 327676, 53, 8, 327677, 53, 196609, 327678, 53, 196609, 327679, 53, 196609, 262144, 53, 7, 262145, 47, 196608, 262146, 47, 196609, 262147, 47, 196609, 262148, 47, 196609, 262149, 47, 196609, 262150, 47, 196609, 262151, 47, 196609, 262152, 47, 196609, 262153, 47, 196609, 262154, 47, 196609, 262155, 47, 7, 393175, 47, 65539, 393176, 54, 0, 393177, 54, 1, 393178, 54, 1, 393179, 54, 1, 393180, 54, 1, 393181, 54, 1, 393182, 54, 1, 393183, 54, 1, 393184, 54, 2, 393185, 47, 65539, 393186, 52, 65536, 393187, 52, 65538, 393188, 47, 65539, 393189, 54, 0, 393190, 54, 1, 393191, 54, 1, 393192, 54, 1, 393193, 54, 1, 393194, 54, 1, 393195, 54, 1, 393196, 54, 1, 393197, 54, 1, 393198, 54, 1, 393199, 54, 2, 393200, 49, 0, 393201, 49, 0, 393202, 49, 0, 393203, 49, 0, 393204, 49, 0, 393205, 49, 0, 393206, 49, 0, 393207, 49, 0, 393208, 49, 0, 393209, 49, 0, 393210, 49, 0, 393211, 49, 0, 393212, 53, 65539, 393213, 52, 0, 393214, 52, 1, 393215, 52, 2, 327680, 53, 65539, 327681, 54, 0, 327682, 54, 1, 327683, 54, 1, 327684, 54, 1, 327685, 54, 1, 327686, 54, 1, 327687, 54, 1, 327688, 54, 1, 327689, 54, 1, 327690, 54, 2, 327691, 47, 65539, 458711, 47, 65539, 458712, 54, 65536, 458713, 54, 65537, 458714, 54, 65537, 458715, 54, 65537, 458716, 54, 65537, 458717, 54, 65537, 458718, 54, 65537, 458719, 54, 65537, 458720, 54, 65538, 458721, 47, 65539, 458722, 52, 65536, 458723, 52, 65538, 458724, 47, 65539, 458725, 54, 65536, 458726, 54, 65537, 458727, 54, 65537, 458728, 54, 65537, 458729, 54, 65537, 458730, 54, 65537, 458731, 54, 65537, 458732, 54, 65537, 458733, 54, 65537, 458734, 54, 65537, 458735, 54, 65538, 458736, 49, 0, 458737, 49, 0, 458738, 49, 0, 458739, 49, 0, 458740, 49, 0, 458741, 49, 0, 458742, 49, 0, 458743, 49, 0, 458744, 49, 0, 458745, 49, 0, 458746, 49, 0, 458747, 49, 0, 458748, 53, 65539, 458749, 52, 131072, 458750, 52, 131073, 458751, 52, 131074, 393216, 53, 65539, 393217, 54, 65536, 393218, 54, 65537, 393219, 54, 65537, 393220, 54, 65537, 393221, 54, 65537, 393222, 54, 65537, 393223, 54, 65537, 393224, 54, 65537, 393225, 54, 65537, 393226, 54, 65538, 393227, 47, 65539, 524247, 47, 131075, 524248, 54, 65540, 524249, 54, 131073, 524250, 54, 131073, 524251, 54, 131073, 524252, 54, 131073, 524253, 54, 131073, 524254, 54, 131073, 524255, 54, 65542, 524256, 54, 65538, 524257, 47, 65539, 524258, 52, 131072, 524259, 52, 131074, 524260, 47, 65539, 524261, 54, 65536, 524262, 54, 65541, 524263, 54, 131073, 524264, 54, 131073, 524265, 54, 131073, 524266, 54, 131073, 524267, 54, 65542, 524268, 54, 65537, 524269, 54, 65537, 524270, 54, 65537, 524271, 54, 65538, 524272, 48, 0, 524273, 48, 0, 524274, 48, 0, 524275, 49, 0, 524276, 49, 0, 524277, 49, 0, 524278, 49, 0, 524279, 49, 0, 524280, 49, 0, 524281, 49, 0, 524282, 49, 0, 524283, 49, 0, 524284, 53, 131075, 524285, 47, 3, 524286, 48, 0, 524287, 47, 3, 458752, 53, 131075, 458753, 54, 65536, 458754, 54, 65537, 458755, 54, 65537, 458756, 54, 65537, 458757, 54, 65537, 458758, 54, 65537, 458759, 54, 65537, 458760, 54, 65537, 458761, 54, 65537, 458762, 54, 65538, 458763, 47, 131075, 589783, 54, 0, 589784, 54, 131079, 589785, 52, 0, 589786, 52, 1, 589787, 52, 1, 589788, 52, 1, 589789, 52, 1, 589790, 52, 2, 589791, 54, 65536, 589792, 54, 65538, 589793, 47, 131075, 589794, 49, 0, 589795, 49, 0, 589796, 47, 131075, 589797, 54, 65536, 589798, 54, 65538, 589799, 48, 0, 589800, 53, 196608, 589801, 53, 196610, 589802, 48, 0, 589803, 54, 65536, 589804, 54, 65537, 589805, 54, 65537, 589806, 54, 65537, 589807, 54, 65538, 589808, 48, 0, 589809, 49, 0, 589810, 49, 0, 589811, 53, 196608, 589812, 53, 6, 589813, 53, 5, 589814, 53, 196610, 589815, 49, 0, 589816, 49, 0, 589817, 49, 0, 589818, 49, 0, 589819, 49, 0, 589820, 49, 0, 589821, 47, 65539, 589822, 48, 0, 589823, 47, 65539, 524288, 49, 0, 524289, 54, 65536, 524290, 54, 65537, 524291, 54, 65537, 524292, 54, 65537, 524293, 54, 65537, 524294, 54, 65537, 524295, 54, 65537, 524296, 54, 65537, 524297, 54, 65537, 524298, 54, 131077, 524299, 54, 2, 655319, 54, 65536, 655320, 54, 65538, 655321, 52, 131072, 655322, 52, 131073, 655323, 52, 131073, 655324, 52, 131073, 655325, 52, 131073, 655326, 52, 131074, 655327, 54, 65536, 655328, 54, 131077, 655329, 54, 2, 655330, 49, 0, 655331, 49, 0, 655332, 54, 0, 655333, 54, 131078, 655334, 54, 65538, 655335, 48, 0, 655336, 52, 0, 655337, 52, 2, 655338, 48, 0, 655339, 54, 65536, 655340, 54, 65537, 655341, 54, 65537, 655342, 54, 65537, 655343, 54, 65538, 655344, 48, 0, 655345, 49, 0, 655346, 49, 0, 655347, 49, 0, 655348, 53, 131072, 655349, 53, 131074, 655350, 49, 0, 655351, 49, 0, 655352, 49, 0, 655353, 49, 0, 655354, 49, 0, 655355, 49, 0, 655356, 49, 0, 655357, 47, 131075, 655358, 48, 0, 655359, 47, 131075, 589824, 49, 0, 589825, 54, 65536, 589826, 54, 65537, 589827, 54, 65537, 589828, 54, 65537, 589829, 54, 65537, 589830, 54, 65537, 589831, 54, 65537, 589832, 54, 65537, 589833, 54, 65537, 589834, 54, 65537, 589835, 54, 65538, 720850, 53, 0, 720851, 53, 2, 720855, 54, 131072, 720856, 54, 196613, 720857, 54, 196609, 720858, 54, 196609, 720859, 54, 196609, 720860, 54, 196609, 720861, 54, 196609, 720862, 54, 196609, 720863, 54, 196614, 720864, 54, 131073, 720865, 54, 131074, 720866, 49, 0, 720867, 49, 0, 720868, 54, 131072, 720869, 54, 131073, 720870, 54, 131074, 720871, 48, 0, 720872, 52, 131072, 720873, 52, 131074, 720874, 48, 0, 720875, 54, 131072, 720876, 54, 131073, 720877, 54, 131073, 720878, 54, 131073, 720879, 54, 131074, 720880, 48, 0, 720881, 49, 0, 720882, 49, 0, 720883, 49, 0, 720884, 49, 0, 720885, 49, 0, 720886, 49, 0, 720887, 49, 0, 720888, 49, 0, 720889, 49, 0, 720890, 49, 0, 720891, 49, 0, 720892, 49, 0, 720893, 49, 0, 720894, 49, 0, 720895, 49, 0, 655360, 49, 0, 655361, 54, 131072, 655362, 54, 131073, 655363, 54, 131073, 655364, 54, 131073, 655365, 54, 131073, 655366, 54, 131073, 655367, 54, 131073, 655368, 54, 131073, 655369, 54, 131073, 655370, 54, 131073, 655371, 54, 131074, 786382, 53, 0, 786383, 53, 1, 786384, 53, 1, 786385, 53, 1, 786386, 53, 131078, 786387, 53, 131077, 786388, 53, 1, 786389, 53, 1, 786390, 53, 2, 786391, 47, 0, 786392, 47, 1, 786393, 47, 1, 786394, 47, 1, 786395, 47, 1, 786396, 47, 1, 786397, 47, 1, 786398, 47, 1, 786399, 47, 1, 786400, 47, 1, 786401, 47, 1, 786402, 47, 1, 786403, 47, 1, 786404, 47, 1, 786405, 47, 1, 786406, 47, 1, 786407, 47, 1, 786408, 47, 1, 786409, 47, 1, 786410, 47, 1, 786411, 47, 1, 786412, 47, 1, 786413, 47, 1, 786414, 47, 1, 786415, 47, 2, 786416, 53, 0, 786417, 53, 1, 786418, 53, 1, 786419, 53, 1, 786420, 53, 1, 786421, 53, 1, 786422, 53, 1, 786423, 53, 1, 786424, 53, 1, 786425, 53, 1, 786426, 53, 1, 786427, 53, 1, 786428, 53, 1, 786429, 53, 1, 786430, 53, 1, 786431, 53, 1, 720896, 53, 2, 720897, 47, 0, 720898, 47, 1, 720899, 47, 1, 720900, 47, 1, 720901, 47, 1, 720902, 47, 1, 720903, 47, 1, 720904, 47, 1, 720905, 47, 1, 720906, 47, 1, 720907, 47, 2, 720908, 53, 0, 720909, 53, 1, 720910, 53, 1, 720911, 53, 1, 720912, 53, 1, 720913, 53, 1, 720914, 53, 1, 720915, 53, 1, 720916, 53, 1, 720917, 53, 1, 720918, 53, 1, 720919, 53, 1, 720920, 53, 1, 720921, 53, 1, 720922, 53, 1, 720923, 53, 1, 720924, 53, 1, 720925, 53, 1, 720926, 53, 1, 720927, 53, 2, 851918, 53, 65536, 851919, 53, 65537, 851920, 53, 65537, 851921, 53, 65537, 851922, 53, 65537, 851923, 53, 65537, 851924, 53, 65537, 851925, 53, 65537, 851926, 53, 65538, 851927, 47, 65536, 851928, 47, 65537, 851929, 47, 65537, 851930, 47, 65537, 851931, 47, 65537, 851932, 47, 65537, 851933, 47, 65537, 851934, 47, 65537, 851935, 47, 65537, 851936, 47, 65537, 851937, 47, 65537, 851938, 47, 65537, 851939, 47, 65537, 851940, 47, 65537, 851941, 47, 65537, 851942, 47, 65537, 851943, 47, 65537, 851944, 47, 65537, 851945, 47, 65537, 851946, 47, 65537, 851947, 47, 65537, 851948, 47, 65537, 851949, 47, 65537, 851950, 47, 65537, 851951, 47, 65538, 851952, 53, 65536, 851953, 53, 65537, 851954, 53, 65537, 851955, 53, 65537, 851956, 53, 65537, 851957, 53, 65537, 851958, 53, 65537, 851959, 53, 65537, 851960, 53, 65537, 851961, 53, 65537, 851962, 53, 65537, 851963, 53, 65537, 851964, 53, 65537, 851965, 53, 65537, 851966, 53, 65537, 851967, 53, 65537, 786432, 53, 65538, 786433, 47, 65536, 786434, 47, 65537, 786435, 47, 65537, 786436, 47, 65537, 786437, 47, 65537, 786438, 47, 65537, 786439, 47, 65537, 786440, 47, 65537, 786441, 47, 65537, 786442, 47, 65537, 786443, 47, 65538, 786444, 53, 65536, 786445, 53, 65537, 786446, 53, 65537, 786447, 53, 65537, 786448, 53, 65537, 786449, 53, 65537, 786450, 53, 65537, 786451, 53, 65537, 786452, 53, 65537, 786453, 53, 65537, 786454, 53, 65537, 786455, 53, 65537, 786456, 53, 65537, 786457, 53, 65537, 786458, 53, 65537, 786459, 53, 65537, 786460, 53, 65537, 786461, 53, 65537, 786462, 53, 65537, 786463, 53, 65538, 917454, 53, 131072, 917455, 53, 131073, 917456, 53, 131073, 917457, 53, 131073, 917458, 53, 131073, 917459, 53, 131073, 917460, 53, 131073, 917461, 53, 131073, 917462, 53, 131074, 917463, 47, 131072, 917464, 47, 131073, 917465, 47, 131073, 917466, 47, 131073, 917467, 47, 131073, 917468, 47, 131073, 917469, 47, 131073, 917470, 47, 131073, 917471, 47, 131073, 917472, 47, 131073, 917473, 47, 131073, 917474, 47, 131073, 917475, 47, 131073, 917476, 47, 131073, 917477, 47, 131073, 917478, 47, 131073, 917479, 47, 131073, 917480, 47, 131073, 917481, 47, 131073, 917482, 47, 131073, 917483, 47, 131073, 917484, 47, 131073, 917485, 47, 131073, 917486, 47, 131073, 917487, 47, 131074, 917488, 53, 131072, 917489, 53, 131073, 917490, 53, 131073, 917491, 53, 131073, 917492, 53, 131073, 917493, 53, 131073, 917494, 53, 131073, 917495, 53, 131073, 917496, 53, 131073, 917497, 53, 131073, 917498, 53, 131073, 917499, 53, 131073, 917500, 53, 131073, 917501, 53, 131073, 917502, 53, 131073, 917503, 53, 131073, 851968, 53, 131074, 851969, 47, 131072, 851970, 47, 131073, 851971, 47, 131073, 851972, 47, 131073, 851973, 47, 131073, 851974, 47, 131073, 851975, 47, 131073, 851976, 47, 131073, 851977, 47, 131073, 851978, 47, 131073, 851979, 47, 131074, 851980, 53, 131072, 851981, 53, 131073, 851982, 53, 131073, 851983, 53, 131073, 851984, 53, 131073, 851985, 53, 131073, 851986, 53, 131073, 851987, 53, 131073, 851988, 53, 131073, 851989, 53, 131073, 851990, 53, 131073, 851991, 53, 131073, 851992, 53, 131073, 851993, 53, 131073, 851994, 53, 131073, 851995, 53, 131073, 851996, 53, 131073, 851997, 53, 131073, 851998, 53, 131073, 851999, 53, 131074 ) [node name="Soldier" parent="." instance=ExtResource( 8 )] position = Vector2( 111.361, 167.466 ) @@ -49,7 +52,7 @@ start_on_play = false position = Vector2( 133.095, -0.638016 ) [node name="Killbox" type="Area2D" parent="."] -position = Vector2( -175.617, 105.37 ) +position = Vector2( 16.9294, 250.937 ) script = ExtResource( 9 ) __meta__ = { "_edit_group_": true @@ -67,3 +70,19 @@ __meta__ = { [node name="CollisionShape2D" type="CollisionShape2D" parent="Savebox"] shape = SubResource( 2 ) + +[node name="ElevatorDoor" parent="." instance=ExtResource( 12 )] +position = Vector2( -446, 160 ) + +[node name="ElevatorDoor2" parent="." instance=ExtResource( 12 )] +position = Vector2( -482, 160 ) + +[node name="Elevator" parent="." instance=ExtResource( 11 )] +position = Vector2( -464, 160 ) +relative_positions = [ Vector2( 0, 0 ), Vector2( 0, -112 ) ] +labels = [ "Bottom", "Top" ] +doors = [ NodePath("../ElevatorDoor"), NodePath("../ElevatorDoor2") ] + +[node name="ElevatorButton" parent="." instance=ExtResource( 13 )] +position = Vector2( -498.391, 161.72 ) +elevator = NodePath("../Elevator") diff --git a/client/Scenes/World.scn b/client/Scenes/World.scn index b4e888a..9e6fc69 100644 Binary files a/client/Scenes/World.scn and b/client/Scenes/World.scn differ diff --git a/client/Scripts/Component/ElevatorControls.gd b/client/Scripts/Component/ElevatorControls.gd new file mode 100644 index 0000000..ba10a00 --- /dev/null +++ b/client/Scripts/Component/ElevatorControls.gd @@ -0,0 +1,4 @@ +extends "res://Scripts/Component/Interactable.gd" + +func _ready(): + connect("interacted", get_parent(), "_on_interact") diff --git a/client/Scripts/Entities/Door.gd b/client/Scripts/Entities/Door.gd index d482e26..a647520 100644 --- a/client/Scripts/Entities/Door.gd +++ b/client/Scripts/Entities/Door.gd @@ -6,34 +6,43 @@ var opened = false export var locked = false export var security_level = 0 var player_level = -1 +var color_node : Node2D + + func lock(): locked = true - $Top/Color.modulate = Color.red + if color_node: + color_node.modulate = Color.red func unlock(): locked = false set_color() func set_color(): - match(security_level): - 0: - $Top/Color.modulate = Color.green - 1: - $Top/Color.modulate = Color.blue - 2: - $Top/Color.modulate = Color.yellow - 3: - $Top/Color.modulate = Color.orange - 4: - $Top/Color.modulate = Color.red - 5: - $Top/Color.modulate = Color.purple + if color_node: + match(security_level): + 0: + color_node.modulate = Color.green + 1: + color_node.modulate = Color.blue + 2: + color_node.modulate = Color.yellow + 3: + color_node.modulate = Color.orange + 4: + color_node.modulate = Color.red + 5: + color_node.modulate = Color.purple # Called when the node enters the scene tree for the first time. func _ready(): connect("body_entered", self, "_on_body_enter") connect("body_exited", self, "_on_body_exit") + if $Top/Color: + color_node = $Top/Color + elif $Color: + color_node = $Color if locked: lock() else: @@ -60,6 +69,7 @@ func close(): if opened: $AnimationPlayer.play("Close") $AudioStreamPlayer2D.play() + $StaticBody2D.collision_layer = 1 $StaticBody2D.collision_mask = 1 opened = false diff --git a/client/Scripts/Entities/Elevator.gd b/client/Scripts/Entities/Elevator.gd new file mode 100644 index 0000000..0875144 --- /dev/null +++ b/client/Scripts/Entities/Elevator.gd @@ -0,0 +1,62 @@ +extends Node2D + +signal elevator_stopped + +export(Array, Vector2) var relative_positions = [Vector2(0,0)] +export(Array, String) var labels = ["Default"] +export(Array, NodePath) var doors = [] +export var current_pos : int = 0 + +var moving : bool = false + +var gui +var motion +var intial_pos : Vector2 +export var elevator_speed = 25 + +func _ready(): + motion = Vector2.ZERO + intial_pos = global_position + +func _on_interact(): + if not moving: + if not gui: + gui = get_node("/root/World/GUI") + gui.open_elevator_menu(self) + +func _on_choice(index): + start_moving(index) + gui.close_elevator_menu() + +func start_moving(index): + if current_pos != index: + moving = true + current_pos = index + + # Close all doors while in transit + for door_path in doors: + var door = get_node(door_path) + door.close() + door.lock() + return true + return false + +func stop_moving(): + emit_signal("elevator_stopped") + moving = false + # Alert doors of updated elevator state + for door_path in doors: + get_node(door_path).on_elevator_stop(current_pos) + +func _physics_process(delta): + if moving: + # Move towards elevator stop + var target_pos = intial_pos + relative_positions[current_pos] + var angle = get_angle_to(target_pos) + var velocity = Vector2(cos(angle),sin(angle)) + global_position += velocity * elevator_speed * delta + + # Stop when elevator is at destination + if global_position.distance_to(target_pos) < 0.25: + global_position = target_pos + stop_moving() diff --git a/client/Scripts/Entities/ElevatorButton.gd b/client/Scripts/Entities/ElevatorButton.gd new file mode 100644 index 0000000..906eb85 --- /dev/null +++ b/client/Scripts/Entities/ElevatorButton.gd @@ -0,0 +1,20 @@ +extends "res://Scripts/Component/Interactable.gd" + +export(NodePath) var elevator +export var call_to_index : int = 0 + +var elevator_node + +func _ready(): + elevator_node = get_node(elevator) + connect("interacted", self, "_on_interact") + $AnimationPlayer.play("Done") + +func _on_interact(): + if elevator_node.start_moving(call_to_index): + elevator_node.connect("elevator_stopped", self, "_on_finish") + $AnimationPlayer.play("Waiting") + +func _on_finish(): + elevator_node.disconnect("elevator_stopped", self, "_on_finish") + $AnimationPlayer.play("Done") diff --git a/client/Scripts/Entities/ElevatorDoor.gd b/client/Scripts/Entities/ElevatorDoor.gd new file mode 100644 index 0000000..15c8b3b --- /dev/null +++ b/client/Scripts/Entities/ElevatorDoor.gd @@ -0,0 +1,10 @@ +extends "res://Scripts/Entities/Door.gd" + +export var level_index : int = 0 + +func on_elevator_stop(index): + if index == level_index: + unlock() + open() + else: + lock() diff --git a/client/Scripts/Entities/Player.gd b/client/Scripts/Entities/Player.gd index ebf3ccb..0e32de7 100644 --- a/client/Scripts/Entities/Player.gd +++ b/client/Scripts/Entities/Player.gd @@ -139,17 +139,17 @@ func user_input(): # Interactions if Input.is_action_just_pressed("interact") and len(interactables) > 0 and not gui.is_in_dialog(): interact() - - # Move down platforms - if is_on_floor() and Input.is_action_just_pressed("ui_up") and Input.is_action_pressed("ui_down"): - var test_pos = Vector2(position.x,position.y+6) - if not test_move(Transform2D(0,test_pos), Vector2(0,1)): - position.y = position.y + 2 - return - + # Jumping - if(test_move(transform, Vector2(0,1)) and Input.is_action_just_pressed("ui_up")): - jumped = true + if Input.is_action_just_pressed("ui_up"): + if Input.is_action_pressed("ui_down"): + if is_on_floor(): + var test_pos = Vector2(position.x,position.y+6) + if not test_move(Transform2D(0,test_pos), Vector2(0,1)): + position.y = position.y + 2 + return + elif(test_move(transform, Vector2(0,1))): + jumped = true # Move left and right <- & -> # - - - - - - - - - - - - - - - diff --git a/client/Scripts/Entities/Wall Light.gd b/client/Scripts/Entities/Wall Light.gd index 1dda072..a01192e 100644 --- a/client/Scripts/Entities/Wall Light.gd +++ b/client/Scripts/Entities/Wall Light.gd @@ -1,7 +1,9 @@ extends Sprite export var shadows : bool = false +export var energy : float = 1.1 func _ready(): $Light2D.show() $Light2D.shadow_enabled = shadows + $Light2D.energy = energy diff --git a/client/Scripts/Systems/GameGui.gd b/client/Scripts/Systems/GameGui.gd index d30ddd6..57cd8a4 100644 --- a/client/Scripts/Systems/GameGui.gd +++ b/client/Scripts/Systems/GameGui.gd @@ -120,3 +120,20 @@ func fade_screen(seconds = 1, fade_in=true): func _on_screen_fade_complete(): emit_signal("screen_fade_complete") + +func open_elevator_menu(elevator): + for i in range($ElevatorDialog/Buttons.get_child_count()): + $ElevatorDialog/Buttons.get_child(i).queue_free() + + var num = 0 + for pos in elevator.relative_positions: + var button = Button.new() + button.text = elevator.labels[num] + button.connect("button_down", elevator, "_on_choice", [num]) + $ElevatorDialog/Buttons.add_child(button) + num = num + 1 + + $ElevatorDialog.popup_centered() + +func close_elevator_menu(): + $ElevatorDialog.hide()