diff --git a/client/.import/animation_reference.png-0380e195c2981cbf6a12a964c592fbc3.stex b/client/.import/animation_reference.png-0380e195c2981cbf6a12a964c592fbc3.stex deleted file mode 100644 index 06861c4..0000000 Binary files a/client/.import/animation_reference.png-0380e195c2981cbf6a12a964c592fbc3.stex and /dev/null differ diff --git a/client/.import/pixel.png-0849b68eac611d31014eca1c4d3ddfa1.md5 b/client/.import/pixel.png-0849b68eac611d31014eca1c4d3ddfa1.md5 new file mode 100644 index 0000000..eb66b4f --- /dev/null +++ b/client/.import/pixel.png-0849b68eac611d31014eca1c4d3ddfa1.md5 @@ -0,0 +1,3 @@ +source_md5="adff44dac2834f17108b17f4084591a1" +dest_md5="e2e7037a5692f3fe173da14e5c60805a" + diff --git a/client/.import/square_light.png-aadfc5d355cc8a74d0d2f8166db807ad.md5 b/client/.import/square_light.png-aadfc5d355cc8a74d0d2f8166db807ad.md5 new file mode 100644 index 0000000..abb4f6b --- /dev/null +++ b/client/.import/square_light.png-aadfc5d355cc8a74d0d2f8166db807ad.md5 @@ -0,0 +1,3 @@ +source_md5="b13caddd7fdd2e51d2b7a6b20a8f47c3" +dest_md5="4475888cf6d0167b58105bf9f678979c" + diff --git a/client/.import/square_light.png-aadfc5d355cc8a74d0d2f8166db807ad.stex b/client/.import/square_light.png-aadfc5d355cc8a74d0d2f8166db807ad.stex new file mode 100644 index 0000000..6da794f Binary files /dev/null and b/client/.import/square_light.png-aadfc5d355cc8a74d0d2f8166db807ad.stex differ diff --git a/client/.import/x07DLrX.jpg-800f7c21b25c7cf1a88b1ba7bf53d2e0.md5 b/client/.import/x07DLrX.jpg-800f7c21b25c7cf1a88b1ba7bf53d2e0.md5 new file mode 100644 index 0000000..ce929e9 --- /dev/null +++ b/client/.import/x07DLrX.jpg-800f7c21b25c7cf1a88b1ba7bf53d2e0.md5 @@ -0,0 +1,3 @@ +source_md5="88515d8ae34cca55294e20310b7476c4" +dest_md5="0f70ef32cfa3623874dce680b21fdd79" + diff --git a/client/.import/x07DLrX.jpg-800f7c21b25c7cf1a88b1ba7bf53d2e0.stex b/client/.import/x07DLrX.jpg-800f7c21b25c7cf1a88b1ba7bf53d2e0.stex new file mode 100644 index 0000000..f8a74f8 Binary files /dev/null and b/client/.import/x07DLrX.jpg-800f7c21b25c7cf1a88b1ba7bf53d2e0.stex differ diff --git a/client/Assets/Art/UI/Credits/x07DLrX.jpg b/client/Assets/Art/UI/Credits/x07DLrX.jpg new file mode 100644 index 0000000..cb3c98d Binary files /dev/null and b/client/Assets/Art/UI/Credits/x07DLrX.jpg differ diff --git a/client/animation_reference.png.import b/client/Assets/Art/UI/Credits/x07DLrX.jpg.import similarity index 67% rename from client/animation_reference.png.import rename to client/Assets/Art/UI/Credits/x07DLrX.jpg.import index 5a0686f..cdc8652 100644 --- a/client/animation_reference.png.import +++ b/client/Assets/Art/UI/Credits/x07DLrX.jpg.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/animation_reference.png-0380e195c2981cbf6a12a964c592fbc3.stex" +path="res://.import/x07DLrX.jpg-800f7c21b25c7cf1a88b1ba7bf53d2e0.stex" metadata={ "vram_texture": false } [deps] -source_file="res://animation_reference.png" -dest_files=[ "res://.import/animation_reference.png-0380e195c2981cbf6a12a964c592fbc3.stex" ] +source_file="res://Assets/Art/UI/Credits/x07DLrX.jpg" +dest_files=[ "res://.import/x07DLrX.jpg-800f7c21b25c7cf1a88b1ba7bf53d2e0.stex" ] [params] diff --git a/client/Assets/Art/square_light.png b/client/Assets/Art/square_light.png new file mode 100644 index 0000000..06327cd Binary files /dev/null and b/client/Assets/Art/square_light.png differ diff --git a/client/Assets/Art/square_light.png.import b/client/Assets/Art/square_light.png.import new file mode 100644 index 0000000..9239010 --- /dev/null +++ b/client/Assets/Art/square_light.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/square_light.png-aadfc5d355cc8a74d0d2f8166db807ad.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Art/square_light.png" +dest_files=[ "res://.import/square_light.png-aadfc5d355cc8a74d0d2f8166db807ad.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=true +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/GUI.tscn b/client/Nodes/GUI.tscn index 1001923..d4d002a 100644 --- a/client/Nodes/GUI.tscn +++ b/client/Nodes/GUI.tscn @@ -1,23 +1,24 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=11 format=2] [ext_resource path="res://Assets/Themes/default.tres" type="Theme" id=1] [ext_resource path="res://Scripts/Systems/GameGui.gd" type="Script" id=2] [ext_resource path="res://Assets/Proprietary/hf-scifi-complete/improbable-v1/Improbable.ttf" type="DynamicFontData" id=3] [ext_resource path="res://Assets/Proprietary/hf-scifi-complete/zapper-v1.1/Zapper.otf" type="DynamicFontData" id=4] [ext_resource path="res://Assets/Proprietary/hf-scifi-complete/marksman-v1/Marksman.ttf" type="DynamicFontData" id=5] +[ext_resource path="res://Scripts/Entities/Fader.gd" type="Script" id=6] [sub_resource type="DynamicFont" id=1] size = 18 font_data = ExtResource( 4 ) -[sub_resource type="StyleBoxFlat" id=4] +[sub_resource type="StyleBoxFlat" id=2] bg_color = Color( 0.2, 0.376471, 0.368627, 0.694118 ) -[sub_resource type="DynamicFont" id=2] +[sub_resource type="DynamicFont" id=3] size = 48 font_data = ExtResource( 3 ) -[sub_resource type="DynamicFont" id=3] +[sub_resource type="DynamicFont" id=4] size = 32 outline_size = 2 outline_color = Color( 0, 0, 0, 0.45098 ) @@ -83,7 +84,7 @@ margin_left = 37.0 margin_top = -9.0 margin_right = 987.0 margin_bottom = 22.0 -custom_styles/panel = SubResource( 4 ) +custom_styles/panel = SubResource( 2 ) __meta__ = { "_edit_use_anchors_": false } @@ -121,7 +122,7 @@ margin_left = 12.0 margin_top = -59.0 margin_right = 1257.0 margin_bottom = -8.0 -custom_fonts/font = SubResource( 2 ) +custom_fonts/font = SubResource( 3 ) text = "Entering: Depths" valign = 2 __meta__ = { @@ -137,9 +138,21 @@ margin_left = -386.0 margin_top = -110.5 margin_right = 386.0 margin_bottom = 110.5 -custom_fonts/font = SubResource( 3 ) +custom_fonts/font = SubResource( 4 ) text = "Press WASD to move" align = 1 __meta__ = { "_edit_use_anchors_": false } + +[node name="Fader" type="ColorRect" parent="."] +visible = false +anchor_right = 1.0 +anchor_bottom = 1.0 +mouse_filter = 2 +color = Color( 0, 0, 0, 1 ) +script = ExtResource( 6 ) +__meta__ = { +"_edit_use_anchors_": false +} +start_with_fade_in = false diff --git a/client/Nodes/NPCs/Aura.tscn b/client/Nodes/NPCs/Aura.tscn index ac142cd..c553d08 100644 --- a/client/Nodes/NPCs/Aura.tscn +++ b/client/Nodes/NPCs/Aura.tscn @@ -1,28 +1,27 @@ -[gd_scene load_steps=12 format=2] +[gd_scene load_steps=13 format=2] [ext_resource path="res://Assets/Sfx/intro/processed.wav" type="AudioStream" id=1] [ext_resource path="res://Scripts/Component/StorySpeaker.gd" type="Script" id=2] [ext_resource path="res://Scripts/Entities/NPCs/Aura.gd" type="Script" id=3] [ext_resource path="res://Assets/Art/Characters/aura.png" type="Texture" id=4] - - +[ext_resource path="res://Scripts/Entities/Fader.gd" type="Script" id=5] [sub_resource type="AtlasTexture" id=1] atlas = ExtResource( 4 ) region = Rect2( 23, 0, 5, 16 ) -[sub_resource type="StreamTexture" id=3] +[sub_resource type="StreamTexture" id=2] load_path = "res://.import/aura.png-d56c2c3c604fb12791bf7613004ed5a9.stex" -[sub_resource type="AtlasTexture" id=4] -atlas = SubResource( 3 ) +[sub_resource type="AtlasTexture" id=3] +atlas = SubResource( 2 ) region = Rect2( 19, 0, 3, 16 ) -[sub_resource type="AtlasTexture" id=5] -atlas = SubResource( 3 ) +[sub_resource type="AtlasTexture" id=4] +atlas = SubResource( 2 ) region = Rect2( 29, 0, 3, 16 ) -[sub_resource type="RectangleShape2D" id=2] +[sub_resource type="RectangleShape2D" id=5] extents = Vector2( 62.9439, 20.084 ) [sub_resource type="Animation" id=6] @@ -160,16 +159,16 @@ texture = SubResource( 1 ) [node name="RightArm" type="Sprite" parent="Torso"] position = Vector2( -3, 0 ) z_index = -1 -texture = SubResource( 4 ) +texture = SubResource( 3 ) [node name="LeftArm" type="Sprite" parent="Torso"] position = Vector2( 3, 0 ) z_index = -1 -texture = SubResource( 5 ) +texture = SubResource( 4 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] visible = false -shape = SubResource( 2 ) +shape = SubResource( 5 ) [node name="Speaker" type="Node" parent="."] script = ExtResource( 2 ) @@ -190,6 +189,18 @@ __meta__ = { "_edit_use_anchors_": false } +[node name="Fader" type="ColorRect" parent="CanvasLayer"] +visible = false +anchor_right = 1.0 +anchor_bottom = 1.0 +mouse_filter = 2 +color = Color( 0, 0, 0, 1 ) +script = ExtResource( 5 ) +__meta__ = { +"_edit_use_anchors_": false +} +start_with_fade_in = false + [node name="AnimationPlayer" type="AnimationPlayer" parent="."] anims/Idle = SubResource( 6 ) anims/Shoot = SubResource( 7 ) diff --git a/client/Nodes/Player.tscn b/client/Nodes/Player.tscn index b08a566..0219ac4 100644 --- a/client/Nodes/Player.tscn +++ b/client/Nodes/Player.tscn @@ -1717,7 +1717,7 @@ tracks/39/keys = { "times": PoolRealArray( 0, 0.5, 0.9 ) } -[sub_resource type="RectangleShape2D" id=23] +[sub_resource type="RectangleShape2D" id=6] extents = Vector2( 3.06702, 6.9149 ) [sub_resource type="AtlasTexture" id=7] @@ -1817,7 +1817,7 @@ zoom = Vector2( 0.187, 0.187 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] position = Vector2( -0.0595379, 2.35723 ) -shape = SubResource( 23 ) +shape = SubResource( 6 ) [node name="Light2D" type="Light2D" parent="."] texture = ExtResource( 3 ) diff --git a/client/Scenes/Dev.tscn b/client/Scenes/Dev.tscn index da463a2..15d5c43 100644 --- a/client/Scenes/Dev.tscn +++ b/client/Scenes/Dev.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=9 format=2] +[gd_scene load_steps=13 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] @@ -8,6 +8,14 @@ [ext_resource path="res://Nodes/NPCs/Aura.tscn" type="PackedScene" id=6] [ext_resource path="res://Nodes/NPCs/Worker.tscn" type="PackedScene" id=7] [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] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 32.0304, 21.0266 ) + +[sub_resource type="RectangleShape2D" id=2] +extents = Vector2( 10, 15.1479 ) [node name="World" type="Node2D"] @@ -15,7 +23,7 @@ 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, 49, 0, 524274, 49, 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( 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 ) [node name="Soldier" parent="." instance=ExtResource( 8 )] position = Vector2( 111.361, 167.466 ) @@ -39,3 +47,23 @@ start_on_play = false [node name="Aura" parent="Scientist2" instance=ExtResource( 6 )] position = Vector2( 133.095, -0.638016 ) + +[node name="Killbox" type="Area2D" parent="."] +position = Vector2( -175.617, 105.37 ) +script = ExtResource( 9 ) +__meta__ = { +"_edit_group_": true +} + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Killbox"] +shape = SubResource( 1 ) + +[node name="Savebox" type="Area2D" parent="."] +position = Vector2( -267.246, 159.958 ) +script = ExtResource( 10 ) +__meta__ = { +"_edit_group_": true +} + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Savebox"] +shape = SubResource( 2 ) diff --git a/client/Scenes/World.scn b/client/Scenes/World.scn index 8df9d27..b4e888a 100644 Binary files a/client/Scenes/World.scn and b/client/Scenes/World.scn differ diff --git a/client/Scripts/Component/Killbox.gd b/client/Scripts/Component/Killbox.gd new file mode 100644 index 0000000..8061545 --- /dev/null +++ b/client/Scripts/Component/Killbox.gd @@ -0,0 +1,8 @@ +extends Area2D + +func _ready(): + connect("body_entered", self, "_on_body_entered") + +func _on_body_entered(body): + if body.has_method("handle_death"): + body.handle_death() diff --git a/client/Scripts/Component/Savebox.gd b/client/Scripts/Component/Savebox.gd new file mode 100644 index 0000000..cec8aac --- /dev/null +++ b/client/Scripts/Component/Savebox.gd @@ -0,0 +1,8 @@ +extends Area2D + +func _ready(): + connect("body_entered", self, "_on_body_entered") + +func _on_body_entered(body): + if body.saved_pos: + body.saved_pos = body.position diff --git a/client/Scripts/Entities/NPCs/Aura.gd b/client/Scripts/Entities/NPCs/Aura.gd index e4f022a..7043c97 100644 --- a/client/Scripts/Entities/NPCs/Aura.gd +++ b/client/Scripts/Entities/NPCs/Aura.gd @@ -39,7 +39,7 @@ func shoot_scene(): func start_fade(): timer.stop() - var fader = get_tree().root.get_node("World").get_node("Fader").get_child(0) + var fader = $CanvasLayer/Fader fader.connect("fade_complete", self, "go_to_credits") fader.fade(2, false) diff --git a/client/Scripts/Entities/Player.gd b/client/Scripts/Entities/Player.gd index d2bf2b3..ebf3ccb 100644 --- a/client/Scripts/Entities/Player.gd +++ b/client/Scripts/Entities/Player.gd @@ -7,7 +7,7 @@ var baseGravity : float = 9.8 # Player movment variables var maxMoveVelocity : float = 150 -var moveAcceleration : float = 125 +var moveAcceleration : float = 100 var moveFriction : float = 65 var jumpVelocity : float = -150 var jumped = false @@ -21,6 +21,35 @@ var interactables = [] # Objects in range to interact with var items = [] # Items in player inventory var equiped = null # Currently equiped item +var saved_pos +func _ready(): + saved_pos = position + +#================== +# Helper Functions +#================== +func is_movement_locked(): + if gui and gui.is_in_dialog(): + return true + return false + +func check_for_nodes(): + if not gui: + gui = get_node("/root/World/GUI") + +#================== +# Death management +#================== +func handle_death(): + print_debug("Player death not implemented!") + gui.fade_screen(0.25, false) + gui.connect("screen_fade_complete", self, "death_fade_complete") + +func death_fade_complete(): + position = saved_pos + gui.fade_screen(1, true) + gui.disconnect("screen_fade_complete", self, "death_fade_complete") + #================== # Inventory System #================== @@ -52,14 +81,18 @@ func interact(): # Game Loop #=========== func _physics_process(delta): + check_for_nodes() + jumped = false # Gravity - motion.y += baseGravity - - if not gui: - gui = get_node("/root/World/GUI") - elif not gui.is_in_dialog(): + if is_on_floor(): + motion.y = 0 + else: + motion.y += baseGravity + + # Manage movement input + if not is_movement_locked(): user_input() if jumped: motion.y = jumpVelocity @@ -68,8 +101,6 @@ func _physics_process(delta): # Apply velocity limits moveMotion = clamp(moveMotion, -maxMoveVelocity, maxMoveVelocity) - - # Apply velocity to frame motion.x = moveMotion @@ -84,17 +115,17 @@ func _physics_process(delta): # conditions func animation_manager(motion : float): - if not is_on_floor(): + if not test_move(transform, Vector2(0,1)): $AnimationPlayer.play("InAir") elif jumped: if $AnimationPlayer.current_animation != "Jump": $AnimationPlayer.play("Jump") elif moveMotion > 0: - $AnimationPlayer.playback_speed = abs(motion)/200 + $AnimationPlayer.playback_speed = abs(motion)/100 if $AnimationPlayer.current_animation != "RunRight": $AnimationPlayer.play("RunRight") elif moveMotion < 0: - $AnimationPlayer.playback_speed = abs(motion)/200 + $AnimationPlayer.playback_speed = abs(motion)/100 if $AnimationPlayer.current_animation != "RunLeft": $AnimationPlayer.play("RunLeft") else: @@ -111,20 +142,27 @@ func user_input(): # 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+5) + var test_pos = Vector2(position.x,position.y+6) if not test_move(Transform2D(0,test_pos), Vector2(0,1)): - position.y = position.y + 1 + position.y = position.y + 2 return # Jumping - if(is_on_floor() and Input.is_action_just_pressed("ui_up")): + if(test_move(transform, Vector2(0,1)) and Input.is_action_just_pressed("ui_up")): jumped = true - + # Move left and right <- & -> + # - - - - - - - - - - - - - - - + var movementModifier = 1 + + if not test_move(transform, Vector2(0,1)): + movementModifier = 0.5 + + # Movement input if(Input.is_action_pressed("ui_left")): - moveMotion = -moveAcceleration + moveMotion = -moveAcceleration * movementModifier if(Input.is_action_pressed("ui_right")): - moveMotion = moveAcceleration + moveMotion = moveAcceleration * movementModifier if is_on_floor() and (!Input.is_action_pressed("ui_left") and !Input.is_action_pressed("ui_right")): if moveMotion > 0: moveMotion = clamp(moveMotion - moveFriction, 0, moveMotion) diff --git a/client/Scripts/Systems/GameGui.gd b/client/Scripts/Systems/GameGui.gd index f4d69a3..d30ddd6 100644 --- a/client/Scripts/Systems/GameGui.gd +++ b/client/Scripts/Systems/GameGui.gd @@ -1,5 +1,7 @@ extends CanvasLayer +signal screen_fade_complete + var in_dialog = false var tip_timer : Timer var zone_timer : Timer @@ -14,6 +16,7 @@ func _ready(): $Dialog.hide() $Tip.hide() $ZoneLabel.hide() + $Fader.connect("fade_complete", self, "_on_screen_fade_complete") func is_in_dialog(): return in_dialog or $Dialog.is_visible_in_tree() @@ -111,3 +114,9 @@ func fade_zone_out(): $ZoneLabel.modulate.a = clamp($ZoneLabel.modulate.a - 0.1, 0, 1) if $ZoneLabel.modulate.a == 0: zone_timer.stop() + +func fade_screen(seconds = 1, fade_in=true): + $Fader.fade(seconds, fade_in) + +func _on_screen_fade_complete(): + emit_signal("screen_fade_complete") diff --git a/client/animation_reference.png b/client/animation_reference.png deleted file mode 100644 index f59a433..0000000 Binary files a/client/animation_reference.png and /dev/null differ