From 4a2b697dd900865457165fc0a6edb5c0ed8106c3 Mon Sep 17 00:00:00 2001 From: Dazai Date: Thu, 28 May 2026 10:00:14 -0300 Subject: [PATCH] =?UTF-8?q?1.2=20atualiza=C3=A7=C3=A3o/add=20void=20damege?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prefabs/Telas/Debug/test_debug.tscn | 41 +++++++++++++++-------------- test/Scripts/Debug/player_debug.gd | 8 ------ test/Scripts/floor.gd | 4 ++- 3 files changed, 24 insertions(+), 29 deletions(-) diff --git a/prefabs/Telas/Debug/test_debug.tscn b/prefabs/Telas/Debug/test_debug.tscn index 63f05df..f2eddfe 100644 --- a/prefabs/Telas/Debug/test_debug.tscn +++ b/prefabs/Telas/Debug/test_debug.tscn @@ -153,7 +153,7 @@ albedo_color = Color(0, 0, 0, 1) material = SubResource("StandardMaterial3D_v5nkp") size = Vector2(50, 50) -[sub_resource type="BoxShape3D" id="BoxShape3D_kbjja"] +[sub_resource type="HeightMapShape3D" id="HeightMapShape3D_csyhx"] [sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_ua6rj"] data = PackedVector3Array(25, 0, 25, -25, 0, 25, 25, 0, -25, -25, 0, 25, -25, 0, -25, 25, 0, -25) @@ -2649,11 +2649,12 @@ mesh = SubResource("PlaneMesh_mnrv2") script = ExtResource("9_csyhx") [node name="Area3D" type="Area3D" parent="wolrd/NavigationRegion3D/floor" unique_id=1116820466] -transform = Transform3D(59.412434, 0, -1.7772434, 0, 50, 0, 2.1131425, 0, 49.968403, 4.307436, 0.018024206, 0) +transform = Transform3D(59.412434, 0, -1.7772434, 0, 50, 0, 2.1131425, 0, 49.968403, 1.1510048, -24.847479, 0) metadata/_edit_group_ = true [node name="CollisionShape3D" type="CollisionShape3D" parent="wolrd/NavigationRegion3D/floor/Area3D" unique_id=1150938352] -shape = SubResource("BoxShape3D_kbjja") +transform = Transform3D(50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0.4705888, 0) +shape = SubResource("HeightMapShape3D_csyhx") [node name="floor_body" type="StaticBody3D" parent="wolrd/NavigationRegion3D/floor" unique_id=861762134] @@ -2771,8 +2772,8 @@ bones/11/name = "front_leg_IK.L" bones/11/parent = 0 bones/11/rest = Transform3D(-3.5762787e-07, -0.99999994, -3.7252885e-08, 0.99999994, -3.5762787e-07, -3.7252896e-08, 3.7252885e-08, -3.7252896e-08, 1, -0.55542713, 0.26531094, 0.10443466) bones/11/enabled = true -bones/11/position = Vector3(-0.34222117, 0.4878111, 0.00742501) -bones/11/rotation = Quaternion(0.0277256, 0.011634788, 0.38677576, 0.92168355) +bones/11/position = Vector3(-0.34543, 0.4905, 0.00443466) +bones/11/rotation = Quaternion(9.967934e-09, -2.4383006e-08, 0.38695103, 0.9221003) bones/11/scale = Vector3(0.99999994, 0.99999994, 1) bones/12/name = "front_hand_anchor.L" bones/12/parent = 11 @@ -2806,99 +2807,99 @@ bones/16/name = "body" bones/16/parent = 0 bones/16/rest = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.02000001, 0.35000002) bones/16/enabled = true -bones/16/position = Vector3(0, -0.02, 0.356819) -bones/16/rotation = Quaternion(0, 0, 0, 1) +bones/16/position = Vector3(0, -0.02, 0.3614919) +bones/16/rotation = Quaternion(0, -0.09666918, 0, 0.9953166) bones/16/scale = Vector3(1, 1, 1) bones/17/name = "middle_upper_leg.L" bones/17/parent = 16 bones/17/rest = Transform3D(-0.0007859469, -0.9998689, 0.016171925, 0.9998689, -0.00052421005, 0.016182521, -0.016171923, 0.016182525, 0.9997382, -0.04632669, 0.113814235, -0.24556553) bones/17/enabled = true bones/17/position = Vector3(-0.04632669, 0.113814235, -0.24556553) -bones/17/rotation = Quaternion(0.14788978, 0.16049093, 0.6245002, 0.7499139) +bones/17/rotation = Quaternion(0.16298701, 0.19119169, 0.62696195, 0.73742783) bones/17/scale = Vector3(1, 1, 0.99999994) bones/18/name = "middle_lower_leg.L" bones/18/parent = 17 bones/18/rest = Transform3D(0.9994814, 0.0015635336, -0.0321615, -0.00052741705, 0.99948126, 0.03219933, 0.032195162, -0.032165673, 0.99896383, 3.1723175e-09, 0.27702358, 3.3760443e-09) bones/18/enabled = true bones/18/position = Vector3(3.1723175e-09, 0.27702358, 3.3760443e-09) -bones/18/rotation = Quaternion(-0.6292372, -0.012505267, -0.020441249, 0.7768439) +bones/18/rotation = Quaternion(-0.50874615, -0.013854257, -0.016527008, 0.8606465) bones/18/scale = Vector3(0.99999994, 0.99999994, 0.99999994) bones/19/name = "rear_upper_leg.L" bones/19/parent = 16 bones/19/rest = Transform3D(-0.0008621215, -0.99984956, 0.017322179, 0.99984956, -0.00056180474, 0.01733452, -0.01732218, 0.017334517, 0.99969965, -0.023978366, -0.18000004, -0.24556553) bones/19/enabled = true bones/19/position = Vector3(-0.023978366, -0.18000004, -0.24556553) -bones/19/rotation = Quaternion(0.088722154, 0.27117276, 0.85480237, 0.43348208) +bones/19/rotation = Quaternion(0.14816624, 0.2871623, 0.8296151, 0.45532775) bones/19/scale = Vector3(0.99999994, 0.99999994, 0.99999994) bones/20/name = "rear_lower_leg.L" bones/20/parent = 19 bones/20/rest = Transform3D(0.99940586, 0.001713167, -0.03442248, -0.0005260503, 0.99940574, 0.03446617, 0.03446107, -0.034427587, 0.9988128, 7.0867827e-09, 0.25908458, -2.3283064e-09) bones/20/enabled = true bones/20/position = Vector3(7.0867827e-09, 0.25908458, -2.3283064e-09) -bones/20/rotation = Quaternion(-0.783023, -0.010707019, -0.025450226, 0.62137973) +bones/20/rotation = Quaternion(-0.7171817, -0.011999667, -0.023310188, 0.6963929) bones/20/scale = Vector3(0.99999994, 1, 0.9999999) bones/21/name = "front_upper_leg.L" bones/21/parent = 16 bones/21/rest = Transform3D(-0.0008288622, -0.9998581, 0.016824983, 0.9998581, -0.00054554804, 0.016836504, -0.016824935, 0.01683655, 0.9997167, -0.023978367, 0.28531107, -0.24556553) bones/21/enabled = true bones/21/position = Vector3(-0.0239784, 0.285311, -0.245566) -bones/21/rotation = Quaternion(0.21304125, 0.07123144, 0.48257962, 0.8465557) +bones/21/rotation = Quaternion(0.2056872, 0.12161765, 0.49354172, 0.83625275) bones/21/scale = Vector3(0.99999994, 0.99999994, 1) bones/22/name = "front_lower_leg.L" bones/22/parent = 21 bones/22/rest = Transform3D(0.99943054, 0.0016599107, -0.033703096, -0.00052195875, 0.9994302, 0.033744767, 0.03373992, -0.03370796, 0.99886185, 1.4013494e-08, 0.26626235, 0) bones/22/enabled = true bones/22/position = Vector3(1.4013494e-08, 0.26626235, 0) -bones/22/rotation = Quaternion(-0.65385646, -0.012757596, -0.021150066, 0.7562154) +bones/22/rotation = Quaternion(-0.5406538, -0.014187076, -0.017488398, 0.8409437) bones/22/scale = Vector3(1, 0.9999998, 0.9999998) bones/23/name = "head" bones/23/parent = 16 bones/23/rest = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.2978834e-18, 0.3017158, 0.02385953) bones/23/enabled = true bones/23/position = Vector3(-5.2978834e-18, 0.3017158, 0.02385953) -bones/23/rotation = Quaternion(0, 0, 0.14280893, 0.98975027) +bones/23/rotation = Quaternion(-1.2669389e-17, 1.700457e-09, -0.14848298, 0.98891497) bones/23/scale = Vector3(1, 1, 1) bones/24/name = "middle_upper_leg.R" bones/24/parent = 16 bones/24/rest = Transform3D(-0.0007859469, 0.9998689, -0.016171925, -0.9998689, -0.00052421005, 0.016182521, 0.016171923, 0.016182525, 0.9997382, 0.04632669, 0.113814235, -0.24556553) bones/24/enabled = true bones/24/position = Vector3(0.04632669, 0.113814235, -0.24556553) -bones/24/rotation = Quaternion(0.14788978, -0.16049093, -0.6245002, 0.7499139) +bones/24/rotation = Quaternion(0.09715541, -0.0978516, -0.62283105, 0.77010864) bones/24/scale = Vector3(1, 1, 0.99999994) bones/25/name = "middle_lower_leg.R" bones/25/parent = 24 bones/25/rest = Transform3D(0.9994814, -0.0015635336, 0.0321615, 0.00052741705, 0.99948126, 0.03219933, -0.032195162, -0.032165673, 0.99896383, -3.1723175e-09, 0.27702358, 3.3760443e-09) bones/25/enabled = true bones/25/position = Vector3(-3.1723175e-09, 0.27702358, 3.3760443e-09) -bones/25/rotation = Quaternion(-0.6292372, 0.012505267, 0.020441249, 0.7768439) +bones/25/rotation = Quaternion(-0.70514053, 0.011406762, 0.022907062, 0.70860565) bones/25/scale = Vector3(0.99999994, 0.99999994, 0.99999994) bones/26/name = "rear_upper_leg.R" bones/26/parent = 16 bones/26/rest = Transform3D(-0.0008621215, 0.99984956, -0.017322179, -0.99984956, -0.00056180474, 0.01733452, 0.01732218, 0.017334517, 0.99969965, 0.023978366, -0.18000004, -0.24556553) bones/26/enabled = true bones/26/position = Vector3(0.023978366, -0.18000004, -0.24556553) -bones/26/rotation = Quaternion(0.08872222, -0.27117294, -0.85480213, 0.43348244) +bones/26/rotation = Quaternion(0.0014558812, -0.22226878, -0.88902855, 0.40027836) bones/26/scale = Vector3(0.99999994, 0.99999994, 0.99999994) bones/27/name = "rear_lower_leg.R" bones/27/parent = 26 bones/27/rest = Transform3D(0.99940586, -0.001713167, 0.03442248, 0.0005260503, 0.99940574, 0.03446617, -0.03446107, -0.034427587, 0.9988128, -7.0867827e-09, 0.25908458, -2.3283064e-09) bones/27/enabled = true bones/27/position = Vector3(-7.0867827e-09, 0.25908458, -2.3283064e-09) -bones/27/rotation = Quaternion(-0.78302336, 0.010707104, 0.025450204, 0.62137926) +bones/27/rotation = Quaternion(-0.82251364, 0.009787845, 0.026733737, 0.56803244) bones/27/scale = Vector3(0.99999994, 1, 0.9999999) bones/28/name = "front_upper_leg.R" bones/28/parent = 16 bones/28/rest = Transform3D(-0.0008288622, 0.9998581, -0.016824983, -0.9998581, -0.00054554804, 0.016836504, 0.016824935, 0.01683655, 0.9997167, 0.023978367, 0.28531107, -0.24556553) bones/28/enabled = true bones/28/position = Vector3(0.0239784, 0.285311, -0.245566) -bones/28/rotation = Quaternion(0.19604306, -0.071496785, -0.4694178, 0.85796404) +bones/28/rotation = Quaternion(0.16125378, 0.0023001456, -0.4489551, 0.87888074) bones/28/scale = Vector3(0.99999994, 0.99999994, 1) bones/29/name = "front_lower_leg.R" bones/29/parent = 28 bones/29/rest = Transform3D(0.99943054, -0.0016599107, 0.033703096, 0.00052195875, 0.9994302, 0.033744767, -0.03373992, -0.03370796, 0.99886185, -1.4013494e-08, 0.26626235, 0) bones/29/enabled = true bones/29/position = Vector3(-1.4013494e-08, 0.26626235, 0) -bones/29/rotation = Quaternion(-0.6308177, 0.013083853, 0.02040489, 0.7755524) +bones/29/rotation = Quaternion(-0.69584143, 0.012108534, 0.022508122, 0.71774054) bones/29/scale = Vector3(1, 0.9999998, 0.9999998) bones/30/name = "middle_leg_IK.R" bones/30/parent = 0 diff --git a/test/Scripts/Debug/player_debug.gd b/test/Scripts/Debug/player_debug.gd index 57dbeb7..90bee9d 100644 --- a/test/Scripts/Debug/player_debug.gd +++ b/test/Scripts/Debug/player_debug.gd @@ -25,14 +25,6 @@ var coins := 0 var is_dead := false - - - - - - - - func _physics_process(delta): sncy() handle_input(delta) diff --git a/test/Scripts/floor.gd b/test/Scripts/floor.gd index ecb1495..1f5e2e8 100644 --- a/test/Scripts/floor.gd +++ b/test/Scripts/floor.gd @@ -13,4 +13,6 @@ func _process(delta: float) -> void: func _on_area_3d_body_entered(body: Node3D) -> void: print(body.name) - + if "health" in body: + var damage = body.health + body.damage(damage)