Tweak enemy stuff

This commit is contained in:
2023-09-13 16:40:16 -07:00
parent 17f2003fe0
commit 6138957524
12 changed files with 592 additions and 832 deletions

View File

@@ -1,11 +1,8 @@
[gd_scene load_steps=48 format=3 uid="uid://bt5rolsyjmx55"]
[gd_scene load_steps=49 format=3 uid="uid://bt5rolsyjmx55"]
[ext_resource type="Script" path="res://Enemies/Scripts/MeleeEnemy.cs" id="1_50och"]
[ext_resource type="PackedScene" uid="uid://b1j0g6ikmnibm" path="res://Enemies/HPComponent.tscn" id="2_1leby"]
[sub_resource type="BoxShape3D" id="BoxShape3D_1nq5h"]
size = Vector3(0.579358, 2.18762, 0.423598)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_hp6tg"]
resource_name = "Material.003"
cull_mode = 2
@@ -1047,7 +1044,7 @@ shadow_mesh = SubResource("ArrayMesh_byqbm")
[sub_resource type="Animation" id="Animation_xyhqi"]
resource_name = "Animation"
length = 3.75
length = 4.0
loop_mode = 1
tracks/0/type = "position_3d"
tracks/0/imported = true
@@ -1174,92 +1171,106 @@ _data = {
"Animation": SubResource("Animation_xyhqi")
}
[sub_resource type="BoxShape3D" id="BoxShape3D_1nq5h"]
size = Vector3(0.641537, 0.560677, 0.708051)
[sub_resource type="BoxShape3D" id="BoxShape3D_lqe1n"]
size = Vector3(0.572433, 1.81406, 0.604365)
[node name="Melee Enemy" type="RigidBody3D" node_paths=PackedStringArray("_hp") groups=["Enemy"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.251952, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0175109, 0)
disable_mode = 2
collision_layer = 0
collision_mask = 33
axis_lock_linear_x = true
axis_lock_linear_y = true
axis_lock_linear_z = true
axis_lock_angular_x = true
axis_lock_angular_y = true
axis_lock_angular_z = true
gravity_scale = 0.0
continuous_cd = true
max_contacts_reported = 20
contact_monitor = true
can_sleep = false
lock_rotation = true
script = ExtResource("1_50och")
_hp = NodePath("HP Component")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0840461, 0.475385, 0.143401)
shape = SubResource("BoxShape3D_1nq5h")
[node name="MeleeEnemy" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0984273, 0.568423, -0.107118)
[node name="MeleeEnemy" type="Node3D" parent="CollisionShape3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0840461, -0.0397255, -0.143401)
[node name="Icosphere001" type="MeshInstance3D" parent="CollisionShape3D/MeleeEnemy"]
transform = Transform3D(0.850843, 0, 0, 0, 0.850843, 0, 0, 0, 0.850843, 0.0805536, 0.468312, 0.158035)
[node name="Icosphere001" type="MeshInstance3D" parent="MeleeEnemy"]
transform = Transform3D(0.85892, 0, 0, 0, 0.85892, 0, 0, 0, 0.85892, 0.0805536, 0.469751, 0.158035)
cast_shadow = 0
mesh = SubResource("ArrayMesh_vf33t")
skeleton = NodePath("")
[node name="Circle001" type="MeshInstance3D" parent="CollisionShape3D/MeleeEnemy"]
transform = Transform3D(1.05, 0, 0, 0, 1.05, 0, 0, 0, 1.05, 0.0457887, 0.476383, 0.128917)
[node name="Circle001" type="MeshInstance3D" parent="MeleeEnemy"]
transform = Transform3D(1.00867, 0, -0.291695, 0, 1.05, 0, 0.291695, 0, 1.00867, 0.0457887, 0.476383, 0.128917)
cast_shadow = 0
mesh = SubResource("ArrayMesh_ngagc")
skeleton = NodePath("")
[node name="Circle002" type="MeshInstance3D" parent="CollisionShape3D/MeleeEnemy"]
transform = Transform3D(1.1, 0, 0, 0, 1.1, 0, 0, 0, 1.1, 0.0659095, 0.483551, 0.119628)
[node name="Circle002" type="MeshInstance3D" parent="MeleeEnemy"]
transform = Transform3D(1.1, 0, 0, 0, 1.0567, 0.305586, 0, -0.305586, 1.0567, 0.0659095, 0.483551, 0.119628)
cast_shadow = 0
mesh = SubResource("ArrayMesh_nmeup")
skeleton = NodePath("")
[node name="Circle004" type="MeshInstance3D" parent="CollisionShape3D/MeleeEnemy"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0868937, 0.567455, 0.186096)
[node name="Circle004" type="MeshInstance3D" parent="MeleeEnemy"]
transform = Transform3D(0.960638, -0.277805, 0, 0.277805, 0.960638, 0, 0, 0, 1, 0.0868937, 0.567455, 0.186096)
cast_shadow = 0
mesh = SubResource("ArrayMesh_nso1s")
skeleton = NodePath("")
[node name="Text003" type="MeshInstance3D" parent="CollisionShape3D/MeleeEnemy"]
transform = Transform3D(0.0536953, 0, 0, 0, 0.0536953, 0, 0, 0, 0.0536953, 0.0626427, 0.123465, 0.11049)
[node name="Text003" type="MeshInstance3D" parent="MeleeEnemy"]
transform = Transform3D(0.0451983, 0, -0.0289879, 0, 0.0536953, 0, 0.0289879, 0, 0.0451983, 0.0626427, 0.123465, 0.11049)
cast_shadow = 0
mesh = SubResource("ArrayMesh_xasdc")
skeleton = NodePath("")
[node name="BezierCircle" type="Node3D" parent="CollisionShape3D/MeleeEnemy"]
[node name="BezierCircle" type="Node3D" parent="MeleeEnemy"]
transform = Transform3D(0.495255, 0, 0, 0, 0.495255, 0, 0, 0, 0.495255, 0.0690689, -0.0909151, 0.128142)
[node name="Text004" type="MeshInstance3D" parent="CollisionShape3D/MeleeEnemy"]
transform = Transform3D(0.0480592, 0, 0, 0, 0.0480592, 0, 0, 0, 0.0480592, 0.0626427, 0.123465, 0.11049)
[node name="Text004" type="MeshInstance3D" parent="MeleeEnemy"]
transform = Transform3D(0.0461675, 0, -0.0133511, 0, 0.0480592, 0, 0.0133511, 0, 0.0461675, 0.0626427, 0.123465, 0.11049)
cast_shadow = 0
mesh = SubResource("ArrayMesh_8gdy4")
skeleton = NodePath("")
[node name="BezierCircle001" type="Node3D" parent="CollisionShape3D/MeleeEnemy"]
[node name="BezierCircle001" type="Node3D" parent="MeleeEnemy"]
transform = Transform3D(0.443271, 0, 0, 0, 0.443271, 0, 0, 0, 0.443271, 0.0690689, -0.0909151, 0.128142)
[node name="Text005" type="MeshInstance3D" parent="CollisionShape3D/MeleeEnemy"]
transform = Transform3D(0.0438454, 0, 0, 0, 0.0438454, 0, 0, 0, 0.0438454, 0.0626427, 0.123465, 0.11049)
[node name="Text005" type="MeshInstance3D" parent="MeleeEnemy"]
transform = Transform3D(0.0291171, 0, -0.0327813, 0, 0.0438454, 0, 0.0327813, 0, 0.0291171, 0.0626427, 0.123465, 0.11049)
cast_shadow = 0
mesh = SubResource("ArrayMesh_bkeh8")
skeleton = NodePath("")
[node name="BezierCircle002" type="Node3D" parent="CollisionShape3D/MeleeEnemy"]
[node name="BezierCircle002" type="Node3D" parent="MeleeEnemy"]
transform = Transform3D(0.404405, 0, 0, 0, 0.404405, 0, 0, 0, 0.404405, 0.0690689, -0.0909151, 0.128142)
[node name="AnimationPlayer" type="AnimationPlayer" parent="CollisionShape3D/MeleeEnemy"]
[node name="AnimationPlayer" type="AnimationPlayer" parent="MeleeEnemy"]
autoplay = "Animation"
libraries = {
"": SubResource("AnimationLibrary_ivhl3")
}
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00804788, 1.02138, -0.0238259)
shape = SubResource("BoxShape3D_1nq5h")
[node name="HP Component" parent="." instance=ExtResource("2_1leby")]
MaximumHP = 1
[node name="Area3D" type="Area3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00804788, 1.01495, 0.00193942)
collision_layer = 0
collision_mask = 68
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0840461, 0.475385, 0.143401)
shape = SubResource("BoxShape3D_1nq5h")
shape = SubResource("BoxShape3D_lqe1n")
[connection signal="body_entered" from="Area3D" to="." method="OnEnemyHit"]
[connection signal="body_entered" from="Area3D" to="." method="OnPlayerHit"]
[connection signal="body_entered" from="Area3D" to="." method="OnEnemyHit"]