diff --git a/client/Nodes/Player.tscn b/client/Nodes/Player.tscn index 7d4ac75..b08a566 100644 --- a/client/Nodes/Player.tscn +++ b/client/Nodes/Player.tscn @@ -8,9 +8,7 @@ [ext_resource path="res://Assets/Art/Objects/flashlight.png" type="Texture" id=6] [ext_resource path="res://Scripts/Entities/Flashlight.gd" type="Script" id=7] - - -[sub_resource type="Animation" id=17] +[sub_resource type="Animation" id=1] resource_name = "Idle" length = 2.0 loop = true @@ -471,7 +469,7 @@ tracks/44/keys = { "values": [ Vector2( 0, -2.5 ) ] } -[sub_resource type="Animation" id=21] +[sub_resource type="Animation" id=2] resource_name = "InAir" length = 1.5 loop = true @@ -716,7 +714,7 @@ tracks/23/keys = { "times": PoolRealArray( 0, 0.8, 1.5 ) } -[sub_resource type="Animation" id=22] +[sub_resource type="Animation" id=3] resource_name = "Jump" length = 0.7 tracks/0/type = "bezier" @@ -870,7 +868,7 @@ tracks/14/keys = { "times": PoolRealArray( 0, 0.4 ) } -[sub_resource type="Animation" id=18] +[sub_resource type="Animation" id=4] resource_name = "RunLeft" length = 0.9 loop = true @@ -1309,7 +1307,7 @@ tracks/42/keys = { "times": PoolRealArray( 0, 0.5, 0.9 ) } -[sub_resource type="Animation" id=19] +[sub_resource type="Animation" id=5] length = 0.9 loop = true tracks/0/type = "bezier" @@ -1719,109 +1717,107 @@ tracks/39/keys = { "times": PoolRealArray( 0, 0.5, 0.9 ) } -[sub_resource type="CapsuleShape2D" id=20] -radius = 1.5 -height = 10.5 - -[sub_resource type="AtlasTexture" id=1] -flags = 8 -atlas = ExtResource( 2 ) -region = Rect2( 1, 7, 3, 4 ) - -[sub_resource type="AtlasTexture" id=2] -flags = 8 -atlas = ExtResource( 2 ) -region = Rect2( 2, 6, 1, 1 ) - -[sub_resource type="AtlasTexture" id=3] -flags = 8 -atlas = ExtResource( 2 ) -region = Rect2( 1, 1, 4, 4 ) - -[sub_resource type="AtlasTexture" id=4] -flags = 8 -atlas = ExtResource( 2 ) -region = Rect2( 7, 8, 1, 2 ) - -[sub_resource type="AtlasTexture" id=5] -flags = 8 -atlas = ExtResource( 2 ) -region = Rect2( 6, 10, 1, 2 ) - -[sub_resource type="AtlasTexture" id=6] -flags = 8 -atlas = ExtResource( 2 ) -region = Rect2( 6, 12, 1, 1 ) +[sub_resource type="RectangleShape2D" id=23] +extents = Vector2( 3.06702, 6.9149 ) [sub_resource type="AtlasTexture" id=7] flags = 8 atlas = ExtResource( 2 ) -region = Rect2( 9, 8, 1, 2 ) +region = Rect2( 1, 7, 3, 4 ) [sub_resource type="AtlasTexture" id=8] flags = 8 atlas = ExtResource( 2 ) -region = Rect2( 10, 10, 1, 2 ) +region = Rect2( 2, 6, 1, 1 ) [sub_resource type="AtlasTexture" id=9] flags = 8 atlas = ExtResource( 2 ) -region = Rect2( 1, 11, 3, 2 ) +region = Rect2( 1, 1, 4, 4 ) [sub_resource type="AtlasTexture" id=10] flags = 8 atlas = ExtResource( 2 ) -region = Rect2( 1, 13, 3, 1 ) +region = Rect2( 7, 8, 1, 2 ) [sub_resource type="AtlasTexture" id=11] flags = 8 atlas = ExtResource( 2 ) -region = Rect2( 1, 14, 3, 1 ) +region = Rect2( 6, 10, 1, 2 ) [sub_resource type="AtlasTexture" id=12] flags = 8 atlas = ExtResource( 2 ) -region = Rect2( 1, 15, 3, 1 ) +region = Rect2( 6, 12, 1, 1 ) [sub_resource type="AtlasTexture" id=13] flags = 8 atlas = ExtResource( 2 ) -region = Rect2( 1, 17, 1, 2 ) +region = Rect2( 9, 8, 1, 2 ) [sub_resource type="AtlasTexture" id=14] flags = 8 atlas = ExtResource( 2 ) -region = Rect2( 1, 19, 1, 2 ) +region = Rect2( 10, 10, 1, 2 ) [sub_resource type="AtlasTexture" id=15] flags = 8 atlas = ExtResource( 2 ) -region = Rect2( 3, 17, 1, 2 ) +region = Rect2( 1, 11, 3, 2 ) [sub_resource type="AtlasTexture" id=16] flags = 8 atlas = ExtResource( 2 ) +region = Rect2( 1, 13, 3, 1 ) + +[sub_resource type="AtlasTexture" id=17] +flags = 8 +atlas = ExtResource( 2 ) +region = Rect2( 1, 14, 3, 1 ) + +[sub_resource type="AtlasTexture" id=18] +flags = 8 +atlas = ExtResource( 2 ) +region = Rect2( 1, 15, 3, 1 ) + +[sub_resource type="AtlasTexture" id=19] +flags = 8 +atlas = ExtResource( 2 ) +region = Rect2( 1, 17, 1, 2 ) + +[sub_resource type="AtlasTexture" id=20] +flags = 8 +atlas = ExtResource( 2 ) +region = Rect2( 1, 19, 1, 2 ) + +[sub_resource type="AtlasTexture" id=21] +flags = 8 +atlas = ExtResource( 2 ) +region = Rect2( 3, 17, 1, 2 ) + +[sub_resource type="AtlasTexture" id=22] +flags = 8 +atlas = ExtResource( 2 ) region = Rect2( 3, 19, 1, 2 ) [node name="Player" type="KinematicBody2D"] -collision/safe_margin = 3.0 script = ExtResource( 4 ) [node name="AnimationPlayer" type="AnimationPlayer" parent="."] autoplay = "Idle" -anims/Idle = SubResource( 17 ) -anims/InAir = SubResource( 21 ) -anims/Jump = SubResource( 22 ) -anims/RunLeft = SubResource( 18 ) -anims/RunRight = SubResource( 19 ) +anims/Idle = SubResource( 1 ) +anims/InAir = SubResource( 2 ) +anims/Jump = SubResource( 3 ) +anims/RunLeft = SubResource( 4 ) +anims/RunRight = SubResource( 5 ) [node name="Camera2D" type="Camera2D" parent="."] current = true zoom = Vector2( 0.187, 0.187 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -visible = false -shape = SubResource( 20 ) +position = Vector2( -0.0595379, 2.35723 ) +shape = SubResource( 23 ) [node name="Light2D" type="Light2D" parent="."] texture = ExtResource( 3 ) @@ -1834,13 +1830,13 @@ position = Vector2( 0, 2 ) material = ExtResource( 1 ) position = Vector2( 0, 0.001 ) z_index = 10 -texture = SubResource( 1 ) +texture = SubResource( 7 ) [node name="Neck" type="Sprite" parent="Sprite/Torso"] material = ExtResource( 1 ) position = Vector2( 0, -2.5 ) z_index = -1 -texture = SubResource( 2 ) +texture = SubResource( 8 ) __meta__ = { "_edit_bone_": true, "_edit_ik_": true @@ -1849,7 +1845,7 @@ __meta__ = { [node name="Head" type="Sprite" parent="Sprite/Torso/Neck"] material = ExtResource( 1 ) position = Vector2( 0, -2.25 ) -texture = SubResource( 3 ) +texture = SubResource( 9 ) offset = Vector2( 0.5, 0 ) __meta__ = { "_edit_bone_": true @@ -1862,7 +1858,7 @@ position = Vector2( -0.0449371, -1.88724 ) material = ExtResource( 1 ) position = Vector2( -2, 0 ) z_index = -1 -texture = SubResource( 4 ) +texture = SubResource( 10 ) __meta__ = { "_edit_bone_": true } @@ -1871,7 +1867,7 @@ __meta__ = { material = ExtResource( 1 ) position = Vector2( -0.5, 1.75 ) z_index = 3 -texture = SubResource( 5 ) +texture = SubResource( 11 ) __meta__ = { "_edit_bone_": true } @@ -1879,7 +1875,7 @@ __meta__ = { [node name="LeftHand" type="Sprite" parent="Sprite/Torso/LeftArm/LeftForearm"] material = ExtResource( 1 ) position = Vector2( 0, 1.35 ) -texture = SubResource( 6 ) +texture = SubResource( 12 ) __meta__ = { "_edit_bone_": true } @@ -1894,7 +1890,7 @@ __meta__ = { material = ExtResource( 1 ) position = Vector2( 2, 0 ) z_index = -2 -texture = SubResource( 7 ) +texture = SubResource( 13 ) __meta__ = { "_edit_bone_": true } @@ -1903,7 +1899,7 @@ __meta__ = { material = ExtResource( 1 ) position = Vector2( 0.5, 1.75 ) z_index = -3 -texture = SubResource( 8 ) +texture = SubResource( 14 ) __meta__ = { "_edit_bone_": true } @@ -1912,7 +1908,7 @@ __meta__ = { material = ExtResource( 1 ) position = Vector2( 0, 1.35 ) rotation = 0.0242677 -texture = SubResource( 6 ) +texture = SubResource( 12 ) __meta__ = { "_edit_bone_": true } @@ -1951,7 +1947,7 @@ energy = 0.5 [node name="Hips" type="Sprite" parent="Sprite/Torso"] material = ExtResource( 1 ) position = Vector2( 0, 2.75 ) -texture = SubResource( 9 ) +texture = SubResource( 15 ) __meta__ = { "_edit_bone_": true } @@ -1960,7 +1956,7 @@ __meta__ = { material = ExtResource( 1 ) position = Vector2( 0, 1 ) z_index = -2 -texture = SubResource( 10 ) +texture = SubResource( 16 ) __meta__ = { "_edit_bone_": true, "_edit_ik_": true @@ -1970,7 +1966,7 @@ __meta__ = { material = ExtResource( 1 ) position = Vector2( 0, 0.75 ) z_index = -2 -texture = SubResource( 11 ) +texture = SubResource( 17 ) __meta__ = { "_edit_bone_": true } @@ -1979,7 +1975,7 @@ __meta__ = { material = ExtResource( 1 ) position = Vector2( 0, 0.75 ) z_index = -2 -texture = SubResource( 12 ) +texture = SubResource( 18 ) __meta__ = { "_edit_bone_": true } @@ -1994,7 +1990,7 @@ __meta__ = { material = ExtResource( 1 ) position = Vector2( -1, 1.75 ) z_index = -2 -texture = SubResource( 13 ) +texture = SubResource( 19 ) __meta__ = { "_edit_bone_": true } @@ -2003,7 +1999,7 @@ __meta__ = { material = ExtResource( 1 ) position = Vector2( 0, 1.75 ) z_index = -2 -texture = SubResource( 14 ) +texture = SubResource( 20 ) __meta__ = { "_edit_bone_": true } @@ -2018,7 +2014,7 @@ __meta__ = { material = ExtResource( 1 ) position = Vector2( 1, 1.75 ) z_index = -2 -texture = SubResource( 15 ) +texture = SubResource( 21 ) __meta__ = { "_edit_bone_": true } @@ -2027,7 +2023,7 @@ __meta__ = { material = ExtResource( 1 ) position = Vector2( 0, 1.75 ) z_index = -2 -texture = SubResource( 16 ) +texture = SubResource( 22 ) __meta__ = { "_edit_bone_": true } diff --git a/client/Scenes/Dev.tscn b/client/Scenes/Dev.tscn index 7157399..da463a2 100644 --- a/client/Scenes/Dev.tscn +++ b/client/Scenes/Dev.tscn @@ -15,7 +15,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, 49, 0, 589812, 49, 0, 589813, 49, 0, 589814, 49, 0, 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, 49, 0, 655349, 49, 0, 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, 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 ) [node name="Soldier" parent="." instance=ExtResource( 8 )] position = Vector2( 111.361, 167.466 ) diff --git a/client/Scripts/Entities/Player.gd b/client/Scripts/Entities/Player.gd index 7f8da09..d2bf2b3 100644 --- a/client/Scripts/Entities/Player.gd +++ b/client/Scripts/Entities/Player.gd @@ -15,12 +15,15 @@ var jumped = false var moveMotion : float = 0 # Player Input ( <- & -> ) var motion : Vector2 = Vector2(0,0) # Player's current velocity -var gui +var gui # Node representing GUI object -var interactables = [] -var items = [] -var equiped = null +var interactables = [] # Objects in range to interact with +var items = [] # Items in player inventory +var equiped = null # Currently equiped item +#================== +# Inventory System +#================== func add_item(item): items.append(item) equip_item(item) @@ -33,63 +36,52 @@ func equip_item(item): else: print("Tried to equip: " + item + " but item was missing!") +#============== +# Interactions +#============== func add_interactable(interactable): interactables.append(interactable) func remove_interactable(interactable): var loc = interactables.find(interactable) if loc >= 0: interactables.remove(loc) +func interact(): + interactables[0].interact() +#========== +# Game Loop +#=========== func _physics_process(delta): jumped = false # Gravity motion.y += baseGravity - if is_on_floor(): - motion.y = 0 if not gui: gui = get_node("/root/World/GUI") elif not gui.is_in_dialog(): user_input() + if jumped: + motion.y = jumpVelocity else: moveMotion = 0 # Apply velocity limits moveMotion = clamp(moveMotion, -maxMoveVelocity, maxMoveVelocity) + + # Apply velocity to frame motion.x = moveMotion animation_manager(moveMotion) move_and_slide(motion, Vector2(0,-1)) - -func user_input(): - if Input.is_action_just_pressed("interact") and len(interactables) > 0 and not gui.is_in_dialog(): - interactables[0].interact() - - 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) - - if not test_move(Transform2D(0,test_pos), Vector2(0,8)): - position.y = position.y + 8 - return - - if(Input.is_action_pressed("ui_left")): - moveMotion = -moveAcceleration - if(Input.is_action_pressed("ui_right")): - moveMotion = moveAcceleration - - if(is_on_floor() and Input.is_action_just_pressed("ui_up")): - motion.y = jumpVelocity - jumped = true - - 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) - elif moveMotion < 0: - moveMotion = clamp(moveMotion + moveFriction, moveMotion, 0) - +#=================== +# Animation Manager +#=================== +# +# Changes animation basd on current +# conditions func animation_manager(motion : float): if not is_on_floor(): @@ -108,3 +100,33 @@ func animation_manager(motion : float): else: $AnimationPlayer.playback_speed = 1 $AnimationPlayer.play("Idle") + +#============ +# User Input +#============ +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+5) + if not test_move(Transform2D(0,test_pos), Vector2(0,1)): + position.y = position.y + 1 + return + + # Jumping + if(is_on_floor() and Input.is_action_just_pressed("ui_up")): + jumped = true + + # Move left and right <- & -> + if(Input.is_action_pressed("ui_left")): + moveMotion = -moveAcceleration + if(Input.is_action_pressed("ui_right")): + moveMotion = moveAcceleration + 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) + elif moveMotion < 0: + moveMotion = clamp(moveMotion + moveFriction, moveMotion, 0) diff --git a/client/default_bus_layout.tres b/client/default_bus_layout.tres index 13b562c..ba3c7d2 100644 --- a/client/default_bus_layout.tres +++ b/client/default_bus_layout.tres @@ -5,7 +5,7 @@ bus/1/name = "Music" bus/1/solo = false bus/1/mute = false bus/1/bypass_fx = false -bus/1/volume_db = -8.39524 +bus/1/volume_db = -6.57885 bus/1/send = "Master" bus/2/name = "Sfx" bus/2/solo = false