diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9ababfb..41e724e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -6,7 +6,11 @@ - + + + + + - { + "keyToString": { + "GdScript Start and Debug.Player GDScript.executor": "Debug", + "Notification.DisplayName-DoNotAsk-GodotSupportNotificationGroupId": "Godot LSP", + "Notification.DoNotAsk-GodotSupportNotificationGroupId": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", + "RunOnceActivity.git.unshallow": "true", + "gdscript.promo.shown": "true", + "git-widget-placeholder": "level", + "ignore.virus.scanning.warn.message": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "settings.editor.selected.configurable": "preferences.build.godotPlugin", + "vue.rearranger.settings.migration": "true" } -}]]> +} - @@ -112,10 +130,22 @@ + + + diff --git a/packed-scenes/skeleton_warrior.tscn b/packed-scenes/skeleton_warrior.tscn index f4b7d61..8982c15 100644 --- a/packed-scenes/skeleton_warrior.tscn +++ b/packed-scenes/skeleton_warrior.tscn @@ -569,43 +569,43 @@ bones/0/name = "root" bones/0/parent = -1 bones/0/rest = Transform3D(1, 2.0611e-15, 2.40863e-07, -6.18329e-15, 1, 1.71143e-08, -2.40863e-07, -1.71143e-08, 1, 0, 0, 0) bones/0/enabled = true -bones/0/position = Vector3(0, 4.4642104e-05, -1.5280306e-12) +bones/0/position = Vector3(-9.563376e-27, 0.00011113626, -3.8040296e-12) bones/0/rotation = Quaternion(-8.561838e-09, 0.00095386495, 9.846086e-11, 0.99999964) bones/0/scale = Vector3(1, 1, 1) bones/1/name = "hips" bones/1/parent = 0 bones/1/rest = Transform3D(1, -1.92983e-22, -2.06635e-07, 9.18536e-22, 1, 3.51128e-15, 2.06635e-07, -3.51128e-15, 1, -2.1013e-22, 0.405663, 8.88178e-16) bones/1/enabled = true -bones/1/position = Vector3(1.1830722e-18, 0.38110882, 1.3147045e-15) -bones/1/rotation = Quaternion(0.0007457528, 0.04282801, -0.00015882103, 0.9990822) +bones/1/position = Vector3(3.616281e-18, 0.3702471, 1.2630593e-15) +bones/1/rotation = Quaternion(0.0007385029, 0.04282813, -0.00015851867, 0.99908215) bones/1/scale = Vector3(1, 1, 1) bones/2/name = "spine" bones/2/parent = 1 bones/2/rest = Transform3D(1, 8.67181e-22, 3.55271e-15, -8.67181e-22, 1, 3.52176e-23, -3.55271e-15, -3.52176e-23, 1, -4.36903e-23, 0.191978, -8.88178e-16) bones/2/enabled = true bones/2/position = Vector3(-3.0535532e-11, 0.191978, 1.6963566e-11) -bones/2/rotation = Quaternion(0.0008712988, 6.5682056e-05, 7.282109e-05, 0.9999997) +bones/2/rotation = Quaternion(0.0008787441, -0.00091022934, 0.00014112236, 0.9999993) bones/2/scale = Vector3(1, 1, 1) bones/3/name = "chest" bones/3/parent = 2 bones/3/rest = Transform3D(1, -2.05374e-22, -1.77636e-14, 2.05374e-22, 1, -1.11653e-14, 1.77636e-14, 1.11653e-14, 1, -9.6328e-23, 0.374988, 1.77636e-15) bones/3/enabled = true bones/3/position = Vector3(1.6852008e-11, 0.374988, 1.6398385e-10) -bones/3/rotation = Quaternion(0.00034422285, -0.00027644183, 0.00016912112, 0.99999994) +bones/3/rotation = Quaternion(0.00036444506, -0.00029313387, 8.3193045e-05, 0.9999999) bones/3/scale = Vector3(1, 1, 1) bones/4/name = "upperarm.l" bones/4/parent = 3 bones/4/rest = Transform3D(0.0572952, 0.998357, 5.96046e-08, -2.98023e-07, -1.19209e-07, 1, 0.998357, -0.0572953, 2.38419e-07, 0.212007, 0.134132, 8.92131e-08) bones/4/enabled = true -bones/4/position = Vector3(0.21194485, 0.13403079, -0.00034368143) -bones/4/rotation = Quaternion(-0.55481815, -0.06430795, -0.656061, 0.5075681) +bones/4/position = Vector3(0.21185738, 0.133987, -0.0003200554) +bones/4/rotation = Quaternion(-0.5528194, -0.05888651, -0.64282316, 0.5269739) bones/4/scale = Vector3(0.999999, 0.999999, 1) bones/5/name = "lowerarm.l" bones/5/parent = 4 bones/5/rest = Transform3D(0.993885, 0.110424, -1.77241e-07, -0.110424, 0.993885, -4.82524e-07, 1.22875e-07, 4.99145e-07, 1, -3.31295e-09, 0.241897, 4.4799e-09) bones/5/enabled = true bones/5/position = Vector3(4.3339096e-08, 0.241897, -1.7245897e-07) -bones/5/rotation = Quaternion(1.9963335e-07, 2.0515191e-08, -0.47474182, 0.8801252) +bones/5/rotation = Quaternion(2.1836006e-07, 7.1092785e-08, -0.5030325, 0.86426747) bones/5/scale = Vector3(1, 1, 1) bones/6/name = "wrist.l" bones/6/parent = 5 @@ -619,28 +619,28 @@ bones/7/parent = 6 bones/7/rest = Transform3D(1, 8.33334e-14, -2.83571e-14, -8.33334e-14, 1, -2.54025e-13, 2.83571e-14, 2.54025e-13, 1, -2.04281e-14, 0.0738259, -1.19209e-07) bones/7/enabled = true bones/7/position = Vector3(-7.3983597e-09, 0.0738259, -1.104577e-08) -bones/7/rotation = Quaternion(-0.3142685, -0.32912812, 0.13183555, 0.8806415) +bones/7/rotation = Quaternion(-0.31712097, -0.33791777, 0.14165103, 0.8747462) bones/7/scale = Vector3(1, 1, 1) bones/8/name = "handslot.l" bones/8/parent = 7 bones/8/rest = Transform3D(0, 1, -2.32809e-07, -1, 0, -6.82762e-08, -6.82761e-08, 2.32809e-07, 1, 8.34841e-10, 0.0961251, -0.0575) bones/8/enabled = true bones/8/position = Vector3(2.3117917e-10, 0.0961252, -0.0575) -bones/8/rotation = Quaternion(0.0012317528, 0.002023693, -0.69993484, 0.7142029) +bones/8/rotation = Quaternion(0.0010258923, 0.0018710368, -0.70068955, 0.7134631) bones/8/scale = Vector3(1, 1, 1) bones/9/name = "upperarm.r" bones/9/parent = 3 bones/9/rest = Transform3D(0.0572954, -0.998357, -1.49012e-07, 2.38419e-07, -1.19209e-07, 1, -0.998357, -0.0572954, 2.38419e-07, -0.212007, 0.134132, 7.46997e-08) bones/9/enabled = true -bones/9/position = Vector3(-0.21188088, 0.13399877, -0.00032642088) -bones/9/rotation = Quaternion(-0.6138644, 0.08423769, 0.62876636, 0.46981648) +bones/9/position = Vector3(-0.21196835, 0.13404256, -0.00035004716) +bones/9/rotation = Quaternion(-0.6109203, 0.08037143, 0.61921597, 0.48671183) bones/9/scale = Vector3(0.999999, 0.999999, 1) bones/10/name = "lowerarm.r" bones/10/parent = 9 bones/10/rest = Transform3D(0.993885, -0.110424, 1.06327e-07, 0.110424, 0.993885, -4.82539e-07, -5.23934e-08, 4.91329e-07, 1, 4.03071e-09, 0.241897, 3.62012e-09) bones/10/enabled = true bones/10/position = Vector3(-4.0220876e-08, 0.241897, -5.4639806e-08) -bones/10/rotation = Quaternion(2.1092681e-07, -6.4838005e-08, 0.49784875, 0.8672639) +bones/10/rotation = Quaternion(2.0713286e-07, -8.845719e-08, 0.5251351, 0.8510189) bones/10/scale = Vector3(1, 1, 1) bones/11/name = "wrist.r" bones/11/parent = 10 @@ -654,21 +654,21 @@ bones/12/parent = 11 bones/12/rest = Transform3D(1, -8.32931e-14, 2.83546e-14, 8.32931e-14, 1, -6.34575e-14, -2.83546e-14, 6.34575e-14, 1, 2.04281e-14, 0.0738259, -1.19209e-07) bones/12/enabled = true bones/12/position = Vector3(-1.4852477e-08, 0.0738259, -6.429319e-08) -bones/12/rotation = Quaternion(-0.31288332, 0.30374113, -0.21209103, 0.8745644) +bones/12/rotation = Quaternion(-0.31587508, 0.31333014, -0.22321607, 0.8673071) bones/12/scale = Vector3(1, 1, 1) bones/13/name = "handslot.r" bones/13/parent = 12 bones/13/rest = Transform3D(0, -1, 2.32809e-07, 1, 0, -6.86063e-08, 6.86063e-08, 2.32809e-07, 1, -8.34841e-10, 0.0961251, -0.0575) bones/13/enabled = true bones/13/position = Vector3(-2.1093065e-08, 0.0961251, -0.0575) -bones/13/rotation = Quaternion(0.0036720238, 0.0047832667, 0.7013167, 0.7128244) +bones/13/rotation = Quaternion(0.0037854915, 0.004865254, 0.70122874, 0.7129098) bones/13/scale = Vector3(1, 1, 1) bones/14/name = "head" bones/14/parent = 3 bones/14/rest = Transform3D(1, 8.09955e-22, 1.77636e-14, -8.09955e-22, 1, 1.49605e-14, -1.77636e-14, -1.49605e-14, 1, 4.67612e-25, 0.268797, 0) bones/14/enabled = true bones/14/position = Vector3(-2.7592258e-11, 0.268797, 7.293915e-11) -bones/14/rotation = Quaternion(-0.0009695825, -0.03160611, 0.00012094964, 0.9995) +bones/14/rotation = Quaternion(-0.00094843935, -0.03035004, 4.4683256e-05, 0.9995389) bones/14/scale = Vector3(1, 1, 1) bones/15/name = "Skeleton_Warrior_Helmet" bones/15/parent = 14 @@ -681,71 +681,71 @@ bones/16/name = "upperleg.l" bones/16/parent = 1 bones/16/rest = Transform3D(1, -1.31243e-07, -1.34242e-07, -1.35828e-07, -0.999396, -0.0347426, -1.29601e-07, 0.0347426, -0.999397, 0.170945, 0.113587, 1.70271e-08) bones/16/enabled = true -bones/16/position = Vector3(0.170945, 0.113587, 0.0006371685) -bones/16/rotation = Quaternion(0.99191403, 0.08226739, 0.07646525, 0.05909196) +bones/16/position = Vector3(0.170945, 0.113587, -0.00068200834) +bones/16/rotation = Quaternion(0.9897965, 0.08309069, 0.07810631, 0.08542925) bones/16/scale = Vector3(1, 1, 1) bones/17/name = "lowerleg.l" bones/17/parent = 16 bones/17/rest = Transform3D(1, 1.62704e-07, 1.37175e-07, -1.30054e-07, 0.977432, -0.211252, -1.68451e-07, 0.211252, 0.977432, -1.1194e-08, 0.227077, -2.32076e-08) bones/17/enabled = true bones/17/position = Vector3(3.8862208e-08, 0.227078, 5.712004e-10) -bones/17/rotation = Quaternion(0.3131739, 7.366862e-08, -2.1485221e-07, 0.94969577) +bones/17/rotation = Quaternion(0.39349306, 6.5096295e-08, -2.6375713e-07, 0.9193276) bones/17/scale = Vector3(1, 1, 1) bones/18/name = "foot.l" bones/18/parent = 17 bones/18/rest = Transform3D(1, -6.39488e-14, 1.68587e-07, -1.36667e-07, 0.585513, 0.810663, -9.87102e-08, -0.810663, 0.585513, -1.49012e-08, 0.149437, 3.72566e-09) bones/18/enabled = true bones/18/position = Vector3(4.4135756e-08, 0.149437, -7.63505e-09) -bones/18/rotation = Quaternion(-0.5771487, -0.20392911, 0.061181907, 0.78839654) +bones/18/rotation = Quaternion(-0.61758554, -0.19966234, 0.07560297, 0.75697243) bones/18/scale = Vector3(1, 1, 0.999999) bones/19/name = "toes.l" bones/19/parent = 18 bones/19/rest = Transform3D(-1, 1.21361e-07, 3.37844e-07, -1.58967e-07, 0.694106, -0.719873, -3.21865e-07, -0.719873, -0.694106, -1.6149e-10, 0.16565, 8.79764e-10) bones/19/enabled = true bones/19/position = Vector3(-6.9984254e-09, 0.16565, 2.6967339e-08) -bones/19/rotation = Quaternion(2.759227e-05, 0.9201821, -0.39149082, -6.070103e-06) +bones/19/rotation = Quaternion(-1.8272955e-06, 0.9201552, -0.39155397, 5.891497e-07) bones/19/scale = Vector3(1, 0.999998, 1) bones/20/name = "upperleg.r" bones/20/parent = 1 bones/20/rest = Transform3D(1, 1.31243e-07, 2.02657e-07, 1.38205e-07, -0.999396, -0.0347426, 1.97975e-07, 0.0347426, -0.999397, -0.170945, 0.113587, 5.32468e-09) bones/20/enabled = true -bones/20/position = Vector3(-0.170945, 0.113587, -0.0006371404) -bones/20/rotation = Quaternion(0.99457985, -0.031209951, 0.030349415, 0.0944232) +bones/20/position = Vector3(-0.170945, 0.113587, 0.00068203674) +bones/20/rotation = Quaternion(0.991154, -0.033077247, 0.029510124, 0.12509523) bones/20/scale = Vector3(1, 1, 1) bones/21/name = "lowerleg.r" bones/21/parent = 20 bones/21/rest = Transform3D(1, -1.65029e-07, -1.36672e-07, 1.32432e-07, 0.977432, -0.211252, 1.6845e-07, 0.211252, 0.977432, 1.18882e-08, 0.227077, -2.32075e-08) bones/21/enabled = true bones/21/position = Vector3(-9.410638e-09, 0.227077, -1.4126008e-08) -bones/21/rotation = Quaternion(0.36779612, -6.8589195e-08, 2.5876037e-07, 0.9299064) +bones/21/rotation = Quaternion(0.4361597, -6.53498e-08, 3.0523222e-07, 0.8998693) bones/21/scale = Vector3(1, 1, 1) bones/22/name = "foot.r" bones/22/parent = 21 bones/22/rest = Transform3D(1, 5.68434e-14, 1.68587e-07, -1.36668e-07, 0.585513, 0.810663, -9.87101e-08, -0.810663, 0.585513, 1.49012e-08, 0.149437, 3.72559e-09) bones/22/enabled = true bones/22/position = Vector3(1.6167903e-08, 0.149437, 6.877464e-09) -bones/22/rotation = Quaternion(-0.6066851, 0.11277694, -0.016317612, 0.78673273) +bones/22/rotation = Quaternion(-0.64505684, 0.11176592, -0.022748988, 0.7555744) bones/22/scale = Vector3(1, 1, 0.999999) bones/23/name = "toes.r" bones/23/parent = 22 bones/23/rest = Transform3D(-1, 1.21361e-07, 3.58529e-08, 5.84281e-08, 0.694106, -0.719873, -1.12251e-07, -0.719873, -0.694106, -1.61491e-10, 0.16565, 2.84604e-09) bones/23/enabled = true bones/23/position = Vector3(7.489696e-09, 0.16565, 2.473087e-08) -bones/23/rotation = Quaternion(-8.8435474e-05, 0.9202203, -0.39140084, 2.0176152e-05) +bones/23/rotation = Quaternion(-8.857048e-05, 0.9202191, -0.39140362, 2.0241838e-05) bones/23/scale = Vector3(1, 0.999998, 1) bones/24/name = "kneeIK.l" bones/24/parent = 0 bones/24/rest = Transform3D(1, -2.47926e-07, -3.89414e-07, -3.89414e-07, 3.57628e-07, -1, 2.47926e-07, 1, 3.57628e-07, 0.170945, 0.29231, 0.575812) bones/24/enabled = true -bones/24/position = Vector3(0.170945, 0.2928967, 0.5763987) +bones/24/position = Vector3(0.170945, 0.29270905, 0.57621104) bones/24/rotation = Quaternion(0.7071068, -2.2534354e-07, -5.00141e-08, 0.7071068) bones/24/scale = Vector3(1, 1, 1) bones/25/name = "control-toe-roll.l" bones/25/parent = 0 bones/25/rest = Transform3D(1, 2.05345e-07, -6.39488e-14, -7.10543e-15, 3.57628e-07, 1, 2.05345e-07, -1, 3.57628e-07, 0.170945, 0.0259902, 0.245789) bones/25/enabled = true -bones/25/position = Vector3(0.20195252, 0.026823819, 0.20742838) -bones/25/rotation = Quaternion(-0.7071709, -7.254089e-08, -7.266158e-08, 0.70704263) +bones/25/position = Vector3(0.20195252, 0.026521329, 0.20091055) +bones/25/rotation = Quaternion(-0.70265836, -7.302894e-08, -7.21577e-08, 0.7115274) bones/25/scale = Vector3(1, 1, 1) bones/26/name = "control-heel-roll.l" bones/26/parent = 25 @@ -786,15 +786,15 @@ bones/31/name = "kneeIK.r" bones/31/parent = 0 bones/31/rest = Transform3D(1, -2.47926e-07, 1.50996e-07, 1.50996e-07, 3.57628e-07, -1, 2.47926e-07, 1, 3.57628e-07, -0.170945, 0.29231, 0.575812) bones/31/enabled = true -bones/31/position = Vector3(-0.170945, 0.2928967, 0.5763987) +bones/31/position = Vector3(-0.170945, 0.29270905, 0.57621104) bones/31/rotation = Quaternion(0.7071068, -3.4279587e-08, 1.4104954e-07, 0.7071068) bones/31/scale = Vector3(1, 1, 1) bones/32/name = "control-toe-roll.r" bones/32/parent = 0 bones/32/rest = Transform3D(1, 2.05345e-07, -5.68434e-14, -1.42109e-14, 3.57628e-07, 1, 2.05345e-07, -1, 3.57628e-07, -0.170945, 0.0259902, 0.245789) bones/32/enabled = true -bones/32/position = Vector3(-0.170945, 0.026151309, 0.2420744) -bones/32/rotation = Quaternion(-0.70363224, -7.2969975e-08, -7.2220715e-08, 0.71056443) +bones/32/position = Vector3(-0.170945, 0.027592799, 0.24817261) +bones/32/rotation = Quaternion(-0.7080455, -7.255722e-08, -7.264727e-08, 0.7061668) bones/32/scale = Vector3(1, 1, 1) bones/33/name = "control-heel-roll.r" bones/33/parent = 32 @@ -842,8 +842,8 @@ bones/39/name = "handIK.l" bones/39/parent = 0 bones/39/rest = Transform3D(-1.19209e-07, 1, 0, -1.19209e-07, 0, 1, 1, 1.19209e-07, 1.19209e-07, 0.713181, 1.10676, 2.99767e-07) bones/39/enabled = true -bones/39/position = Vector3(0.5205538, 0.7691192, -0.055347774) -bones/39/rotation = Quaternion(0.79615164, 0.0038443154, 0.6050841, 0.0010026048) +bones/39/position = Vector3(0.5205538, 0.76974005, -0.05542251) +bones/39/rotation = Quaternion(0.7960877, 0.0037652743, 0.6051688, 0.0009816949) bones/39/scale = Vector3(1, 1, 1) bones/40/name = "elbowIK.r" bones/40/parent = 0 @@ -856,12 +856,12 @@ bones/41/name = "handIK.r" bones/41/parent = 0 bones/41/rest = Transform3D(0, -1, -5.96046e-08, 1.78814e-07, -1.19209e-07, 1, -1, -5.96046e-08, 1.19209e-07, -0.713182, 1.10676, -6.1348e-08) bones/41/enabled = true -bones/41/position = Vector3(-0.51086646, 0.7691192, 0.060142945) -bones/41/rotation = Quaternion(-0.76037854, 0.0033028899, 0.64947176, -0.00028539493) +bones/41/position = Vector3(-0.51086646, 0.7697392, 0.06006825) +bones/41/rotation = Quaternion(-0.76030976, 0.0032252385, 0.64955264, -0.00025994965) bones/41/scale = Vector3(1, 1, 1) [node name="Skeleton_Warrior_Helmet" type="BoneAttachment3D" parent="Rig/Skeleton3D"] -transform = Transform3D(0.99971324, -0.00023451865, 0.023942128, 0.0002827404, 0.9999979, -0.002010728, -0.023941614, 0.0020169213, 0.9997113, 0.0002573577, 1.1913595, 0.0024997625) +transform = Transform3D(0.99970055, -4.2982967e-05, 0.024470732, 9.406045e-05, 0.9999978, -0.0020861425, -0.024470605, 0.0020878196, 0.99969834, 0.00021011122, 1.1805642, 0.0025097767) bone_name = "Skeleton_Warrior_Helmet" bone_idx = 15 @@ -916,7 +916,7 @@ transform = Transform3D(1, 6.366463e-12, 9.313226e-10, -2.0982043e-09, 1, -2.433 shape = SubResource("CapsuleShape3D_c30pj") [node name="lowerarm_r" type="BoneAttachment3D" parent="Rig/Skeleton3D"] -transform = Transform3D(-0.5719829, -0.47338277, -0.66988266, -0.22110336, -0.69745916, 0.68166184, -0.7899028, 0.5380122, 0.29426894, -0.38809457, 0.95080125, -0.079228215) +transform = Transform3D(-0.59538233, -0.46485147, -0.6553106, -0.22936319, -0.6833474, 0.69312894, -0.7700067, 0.5629807, 0.30023375, -0.39019513, 0.94760334, -0.08569488) bone_name = "lowerarm.r" bone_idx = 10 @@ -930,7 +930,7 @@ shape = SubResource("CapsuleShape3D_wwi0t") disabled = true [node name="lowerarm_l" type="BoneAttachment3D" parent="Rig/Skeleton3D"] -transform = Transform3D(-0.4694419, 0.5471431, 0.6930061, 0.0681653, -0.76006365, 0.6462628, 0.8803271, 0.3506218, 0.31951016, 0.37893438, 0.9674355, -0.14814314) +transform = Transform3D(-0.49137738, 0.54556465, 0.6789007, 0.07470204, -0.7502238, 0.6569494, 0.8677359, 0.37352547, 0.32788894, 0.37978524, 0.9660023, -0.15420124) bone_name = "lowerarm.l" bone_idx = 5 @@ -944,7 +944,7 @@ shape = SubResource("CapsuleShape3D_ba1wv") disabled = true [node name="lowerleg_r" type="BoneAttachment3D" parent="Rig/Skeleton3D"] -transform = Transform3D(0.99816555, -0.059277307, 0.012317149, -0.056702778, -0.843988, 0.53335667, -0.021220408, -0.53307676, -0.845801, -0.18203369, 0.27213973, 0.057563644) +transform = Transform3D(0.9980705, -0.0591214, 0.01897391, -0.058538582, -0.7940663, 0.6050059, -0.020702237, -0.60494924, -0.79599506, -0.18188575, 0.2644355, 0.07258026) bone_name = "lowerleg.r" bone_idx = 21 @@ -958,7 +958,7 @@ shape = SubResource("CapsuleShape3D_r0iiv") disabled = true [node name="lowerleg_l" type="BoneAttachment3D" parent="Rig/Skeleton3D"] -transform = Transform3D(0.98351884, 0.1768392, -0.0376653, 0.17178091, -0.8489318, 0.49980617, 0.05641006, -0.49803898, -0.8653181, 0.20775603, 0.2722246, 0.011821548) +transform = Transform3D(0.98260856, 0.17470862, -0.06290692, 0.17737511, -0.7828768, 0.59635735, 0.05494039, -0.5971438, -0.80025035, 0.2079954, 0.26320475, 0.022399057) bone_name = "lowerleg.l" bone_idx = 17 @@ -979,10 +979,6 @@ libraries = { } [node name="AnimationTree" type="AnimationTree" parent="."] -libraries = { -&"": SubResource("AnimationLibrary_1dodv"), -&"Skeleton": ExtResource("4_fc2wc") -} tree_root = SubResource("AnimationNodeStateMachine_7v7qh") anim_player = NodePath("../AnimationPlayer") parameters/IWR/blend_position = Vector2(-0.001821518, 0.0055248737) diff --git a/scripts/audio_manager.gd b/scripts/audio_manager.gd index 28cb696..13a511c 100644 --- a/scripts/audio_manager.gd +++ b/scripts/audio_manager.gd @@ -2,16 +2,12 @@ extends Node @onready var background_music_player: AudioStreamPlayer = $BackgroundMusic @onready var voice_player: AudioStreamPlayer = $Voice - func _on_player_game_over() -> void: - # Signal-Handler bleibt für Godot-Verbindungen unverändert und delegiert an die Fachlogik. + # Delegate to playback logic play_if_idle(voice_player) - func play_if_idle(player: AudioStreamPlayer) -> void: - # Guard Clauses: sichere und idempotente Ausführung - if player == null: - return + # Play only if not already playing if player.playing: return - player.play() \ No newline at end of file + player.play() diff --git a/scripts/chest.gd b/scripts/chest.gd index 04b0c64..ab6797e 100644 --- a/scripts/chest.gd +++ b/scripts/chest.gd @@ -1,17 +1,13 @@ class_name Chest extends ItemInteractable -# Aktionstexte -const ACTION_OPEN_CHEST: StringName = &"open chest" -const ACTION_CLOSE_CHEST: StringName = &"close chest" -const ACTION_COLLECT: StringName = &"collect gold" -# Animationsnamen -const ANIM_TAKE_GOLD: StringName = &"take_gold" +# Action texts +const ACTION_COLLECT: StringName = &"collect gold" +# Animation names +const ANIM_TAKE_GOLD: StringName = &"take_gold" @export var gold_amount: int = 10 - -var has_gold: bool = false - +var has_gold: bool = false func _ready() -> void: state_changed.connect(_on_state_changed) @@ -20,7 +16,6 @@ func _ready() -> void: state = States.closed update_action_name() - func _on_interact() -> void: match state: States.closed: @@ -35,7 +30,6 @@ func _on_interact() -> void: state = States.closed update_action_name() - func _on_state_changed(new_state: States) -> void: match new_state: States.opened: @@ -44,30 +38,18 @@ func _on_state_changed(new_state: States) -> void: animation_player.play(ANIM_CLOSE) States.looted: animation_player.play(ANIM_TAKE_GOLD) - - States.destroyed: - pass - States.hidden: - pass - States.idle: - pass + _: + pass # Other states: destroyed, hidden, idle func update_action_name() -> void: match state: - States.closed: + States.closed, States.looted: interaction_area.action_name = ACTION_OPEN States.opened: interaction_area.action_name = ACTION_COLLECT if has_gold else ACTION_CLOSE - States.looted: - interaction_area.action_name = ACTION_OPEN + _: + pass # Other states - States.destroyed: - pass - States.hidden: - pass - States.idle: - pass - func collect_gold() -> void: GameManager.player.gold += gold_amount - has_gold = false \ No newline at end of file + has_gold = false diff --git a/scripts/enemies_ui_manager.gd b/scripts/enemies_ui_manager.gd index 712afed..4d8d20d 100644 --- a/scripts/enemies_ui_manager.gd +++ b/scripts/enemies_ui_manager.gd @@ -4,26 +4,22 @@ const ENEMY_UI_SCENE: PackedScene = preload("res://packed-scenes/enemy_ui.tscn") @export var enemies_ui_container: VBoxContainer @onready var spawn_manager: Node = $"../SpawnManager" - func _ready() -> void: spawn_manager.enemy_ui_ready = true - func rebuild_enemy_ui(enemies: Array[Enemy]) -> void: _clear_enemy_ui() if enemies.is_empty(): return for enemy in enemies: - var enemy_ui: Node = _create_enemy_ui_instance(enemy) - enemies_ui_container.add_child(enemy_ui) - + enemies_ui_container.add_child(_create_enemy_ui_instance(enemy)) func _clear_enemy_ui() -> void: - for child in enemies_ui_container.get_children(): + for child: Node in enemies_ui_container.get_children(): child.queue_free() - func _create_enemy_ui_instance(enemy: Enemy) -> Node: - var ui: Node = ENEMY_UI_SCENE.instantiate() + var ui := ENEMY_UI_SCENE.instantiate() ui.enemy = enemy - return ui \ No newline at end of file + return ui + diff --git a/scripts/enemy.gd b/scripts/enemy.gd index f469eac..44bde2e 100644 --- a/scripts/enemy.gd +++ b/scripts/enemy.gd @@ -64,7 +64,9 @@ func _update_chasing_navigation() -> void: return var next_path_position: Vector3 = navigation_agent.get_next_path_position() - model.look_at(next_path_position, Vector3.UP) + # Prüfen, ob die Position unterschiedlich ist, bevor look_at aufgerufen wird + if not model.global_position.is_equal_approx(next_path_position): + model.look_at(next_path_position, Vector3.UP) # Nur horizontale Bewegung steuern, vertikale Komponente beibehalten var to_next := next_path_position - global_position diff --git a/scripts/enemy_ui.gd b/scripts/enemy_ui.gd index 8250556..ed21da5 100644 --- a/scripts/enemy_ui.gd +++ b/scripts/enemy_ui.gd @@ -25,4 +25,4 @@ func _update_ui() -> void: if _enemy != null: unit_name.text = _enemy.unit_name else: - unit_name.text = DEFAULT_UNIT_NAME \ No newline at end of file + unit_name.text = DEFAULT_UNIT_NAME diff --git a/scripts/spawn_manager.gd b/scripts/spawn_manager.gd index e69662f..3c1fe52 100644 --- a/scripts/spawn_manager.gd +++ b/scripts/spawn_manager.gd @@ -8,6 +8,11 @@ const ENEMY_NAME_PATTERN := "%s%d" @export var enemies_ui_manager: Node @export var spawn_points_container: Node +const ENEMY_SCENE_PATHS := [ + "res://packed-scenes/skeleton_warrior.tscn" + # Weitere Enemy-Szenen hier hinzufügen +] + var player: Player var current_enemies: Array[Enemy] = [] var _enemy_counter: int = 0 @@ -27,14 +32,30 @@ func _ready() -> void: player = get_tree().get_first_node_in_group(PLAYER_GROUP) if player == null: print("Error: No player found!") - collect_spawn_points_from_container() - +# Lade Enemy-Szenen automatisch, falls nicht zugewiesen +func load_default_enemy_scenes() -> void: + push_warning("No enemy scenes configured. Loading default enemy scenes...") + for path in ENEMY_SCENE_PATHS: + if ResourceLoader.exists(path): + var scene := load(path) as PackedScene + if scene != null: + enemy_scenes.append(scene) + print("Loaded enemy scene: %s" % path) + else: + push_warning("Enemy scene not found: %s" % path) + + if enemy_scenes.is_empty(): + push_error("Could not load any enemy scenes!") + # Sammelt SpawnPoints aus dem konfigurierten Container (falls vorhanden) func collect_spawn_points_from_container() -> void: if spawn_points_container == null: - push_warning("spawn_points_container is not assigned; cannot auto-collect SpawnPoints.") - return + push_warning("spawn_points_container is not assigned! Try to find on my own...") + spawn_points_container = get_tree().root.find_child("SpawnPointsContainer", true, false) + if spawn_points_container == null: + push_warning("spawn_points_container not found!!") + return var collected: Array[SpawnPoint] = [] var children: Array = spawn_points_container.get_children() for child in children: @@ -60,8 +81,7 @@ func maintain_enemy_quota() -> void: func spawn_enemy(spawn_point: SpawnPoint) -> void: if enemy_scenes.is_empty(): - push_warning("No enemy scenes configured.") - return + load_default_enemy_scenes() var scene: PackedScene = enemy_scenes.pick_random() if scene == null: push_warning("No enemy scene available to spawn.") @@ -88,6 +108,12 @@ func configure_enemy(new_enemy: Enemy, spawn_point: SpawnPoint) -> void: # Fügt Gegner zur Szene hinzu und markiert den SpawnPoint func register_enemy(new_enemy: Enemy, spawn_point: SpawnPoint) -> void: + if enemies_container == null: + push_warning("enemies_container is not assigned! Try to find on my own...") + enemies_container = get_tree().root.find_child("Enemies", true, false) + if enemies_container == null: + push_warning("enemies_container not found!!") + return enemies_container.add_child(new_enemy) spawn_point.is_occupied = true spawn_point.enemy = new_enemy @@ -100,6 +126,9 @@ func update_enemies_ui() -> void: func find_empty_spawn_points() -> Array[SpawnPoint]: + if spawn_points.size() == 0: + collect_spawn_points_from_container() + var empty_spawn_points: Array[SpawnPoint] = [] print("Count of spawn points: " + str(spawn_points.size())) for sp in spawn_points: diff --git a/scripts/ui.gd b/scripts/ui.gd index d4313c3..d28add4 100644 --- a/scripts/ui.gd +++ b/scripts/ui.gd @@ -44,7 +44,7 @@ func _on_player_loaded() -> void: update_gold_text(player.gold) -func _on_state_changed(old_state: Unit.States, new_state: Unit.States) -> void: +func _on_state_changed(_old_state: Unit.States, new_state: Unit.States) -> void: # Update the crosshair visibility based on the new state crosshair.visible = (new_state == Unit.States.aiming) diff --git a/signature b/signature new file mode 100644 index 0000000..df06e65 --- /dev/null +++ b/signature @@ -0,0 +1,6 @@ +-----BEGIN SSH SIGNATURE----- +U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgg2rc43m2QCxaSuRNod9lApgSYX +Cm7/t8roUamTd6/uoAAAAFZ2l0ZWEAAAAAAAAABnNoYTUxMgAAAFMAAAALc3NoLWVkMjU1 +MTkAAABAvDj3mfW9pdOJlEMm2K87Q0Co9azRPn5h0bChgu02aBPoZgreRvwAzLZIQpHA0T +Oj96SkBFVglMFxX/DxoM46DA== +-----END SSH SIGNATURE-----