Add basic implementation for footsteps
Add disengage to eden pillar Fix level up sound effect trigger
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=16 format=3 uid="uid://cmvimr0pvsgqy"]
|
||||
[gd_scene load_steps=17 format=3 uid="uid://cmvimr0pvsgqy"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d2m7esc5ypl7y" path="res://src/enemy/enemy_types/10. Eden Pillar/EdenPillar.cs" id="1_p8jc1"]
|
||||
[ext_resource type="PackedScene" uid="uid://cktycana6xxtp" path="res://src/enemy/enemy_types/10. Eden Pillar/EdenPillarModelView.tscn" id="3_o285m"]
|
||||
@@ -27,6 +27,9 @@ radius = 0.886719
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_xdeci"]
|
||||
radius = 7.98633
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_t4xb3"]
|
||||
radius = 20.0
|
||||
|
||||
[node name="Eden Pillar" type="CharacterBody3D"]
|
||||
collision_layer = 10
|
||||
collision_mask = 0
|
||||
@@ -131,3 +134,11 @@ collision_mask = 32
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="PlayerDetector"]
|
||||
shape = SubResource("CylinderShape3D_xdeci")
|
||||
|
||||
[node name="LoseTrackOfPlayer" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 0
|
||||
collision_mask = 32
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="LoseTrackOfPlayer"]
|
||||
shape = SubResource("CylinderShape3D_t4xb3")
|
||||
|
||||
@@ -38,6 +38,8 @@ public partial class EdenPillar : Enemy3D, IHasPrimaryAttack, IHasSecondaryAttac
|
||||
|
||||
[Node] public Area3D PlayerDetector { get; set; } = default!;
|
||||
|
||||
[Node] public Area3D LoseTrackOfPlayer { get; set; } = default!;
|
||||
|
||||
[Node] public EngagePlayerBehavior EngagePlayerBehavior { get; set; } = default!;
|
||||
|
||||
|
||||
@@ -50,10 +52,13 @@ public partial class EdenPillar : Enemy3D, IHasPrimaryAttack, IHasSecondaryAttac
|
||||
public void OnReady()
|
||||
{
|
||||
PlayerDetector.BodyEntered += PlayerDetector_BodyEntered;
|
||||
LoseTrackOfPlayer.BodyExited += LoseTrackOfPlayer_BodyExited;
|
||||
EngagePlayerBehavior.TakeAction += PerformAction;
|
||||
HealthComponent.HealthReachedZero += HealthComponent_HealthReachedZero;
|
||||
}
|
||||
|
||||
private void LoseTrackOfPlayer_BodyExited(Node3D body) => EngagePlayerBehavior.Disengage();
|
||||
|
||||
private void HealthComponent_HealthReachedZero()
|
||||
{
|
||||
StoneRotation.Stop();
|
||||
|
||||
Reference in New Issue
Block a user