Add navigation regions to all floors
Actually fix the annoying LookAt bug for real this time I hope
This commit is contained in:
@@ -117,6 +117,8 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
|
||||
this.Provide();
|
||||
|
||||
_enemyLogic.Start();
|
||||
|
||||
_previousPosition = GlobalPosition;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -206,6 +208,7 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
|
||||
var randomSpawnPoint = spawnPointsGodotCollection.PickRandom();
|
||||
|
||||
GlobalPosition = randomSpawnPoint.GlobalPosition;
|
||||
_previousPosition = GlobalPosition;
|
||||
|
||||
if (this is IHavePatrolBehavior patrolEnemy)
|
||||
patrolEnemy.PatrolBehavior.HomePosition = GlobalPosition;
|
||||
@@ -218,17 +221,12 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
|
||||
|
||||
protected void LookAtTarget(Vector3 targetPosition)
|
||||
{
|
||||
var velocity = GlobalPosition - _previousPosition;
|
||||
if (velocity.IsZeroApprox())
|
||||
{
|
||||
_previousPosition = GlobalPosition;
|
||||
if (GlobalPosition.IsEqualApprox(targetPosition))
|
||||
return;
|
||||
}
|
||||
|
||||
var lookDirection = GlobalPosition - targetPosition;
|
||||
var look = new Vector3(lookDirection.X, GlobalPosition.Y, lookDirection.Z);
|
||||
if (!look.IsEqualApprox(GlobalPosition))
|
||||
LookAt(look - new Vector3(0.001f, 0.001f, 0.001f), Vector3.Up);
|
||||
if (GlobalPosition.DistanceTo(look) > 0.01)
|
||||
LookAt(look, Vector3.Up);
|
||||
}
|
||||
|
||||
protected void SetTarget(Vector3 targetPosition) => TargetPosition = targetPosition;
|
||||
|
||||
@@ -42,11 +42,11 @@ script = ExtResource("1_xsluo")
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.74339, 0)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2.0617, 0)
|
||||
shape = SubResource("CapsuleShape3D_cwfph")
|
||||
|
||||
[node name="Collision" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.74339, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.0617, 0)
|
||||
|
||||
[node name="Collision" type="Area3D" parent="Collision"]
|
||||
collision_layer = 2048
|
||||
@@ -84,13 +84,13 @@ collision_mask = 34
|
||||
shape = SubResource("CylinderShape3D_drfkj")
|
||||
|
||||
[node name="Visual" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.657239, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.975554, 0)
|
||||
|
||||
[node name="EnemyModelView" parent="Visual" instance=ExtResource("4_o3b7p")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="Components" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.74339, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.0617, 0)
|
||||
|
||||
[node name="PatrolBehavior" parent="Components" instance=ExtResource("4_drfkj")]
|
||||
unique_name_in_owner = true
|
||||
@@ -112,7 +112,7 @@ radius = 1.0
|
||||
debug_enabled = true
|
||||
|
||||
[node name="SFX" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.74339, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.0617, 0)
|
||||
|
||||
[node name="AbsorbSFX" type="AudioStreamPlayer3D" parent="SFX"]
|
||||
unique_name_in_owner = true
|
||||
|
||||
@@ -727,7 +727,7 @@ autoplay = true
|
||||
bus = &"SFX"
|
||||
|
||||
[node name="Shadow" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(0.115, 0, 0, 0, -5.02681e-09, 0.115, 0, -0.115, -5.02681e-09, -0.00018537, 0.00315392, 0.0453106)
|
||||
transform = Transform3D(0.115, 0, 0, 0, -5.02681e-09, 0.115, 0, -0.115, -5.02681e-09, -0.00018537, -0.942894, 0.0453106)
|
||||
transparency = 0.1
|
||||
cast_shadow = 0
|
||||
texture_filter = 0
|
||||
|
||||
@@ -93,44 +93,61 @@ Michael = 0.5
|
||||
[node name="Floor02" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("2_00xd7")
|
||||
FolderName = "Floor02"
|
||||
FloorOdds = Array[float]([0.5, 0.5])
|
||||
FloorOdds = Array[float]([0.33, 0.33, 0.33])
|
||||
Sproingy = 0.5
|
||||
Michael = 0.5
|
||||
FilthEater = 0.1
|
||||
GoldSproingy = 0.05
|
||||
TrueRedAmbassador = 0.3
|
||||
|
||||
[node name="Floor03" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("2_00xd7")
|
||||
FolderName = "Floor03"
|
||||
FloorOdds = Array[float]([1.0])
|
||||
FloorOdds = Array[float]([0.33, 0.33, 0.33])
|
||||
Sproingy = 0.25
|
||||
Michael = 0.5
|
||||
FilthEater = 0.5
|
||||
FilthEater = 0.3
|
||||
Sara = 0.1
|
||||
GoldSproingy = 0.05
|
||||
TrueRedAmbassador = 0.3
|
||||
|
||||
[node name="Floor04" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("2_00xd7")
|
||||
FolderName = "Floor04"
|
||||
FloorOdds = Array[float]([1.0])
|
||||
Sproingy = 1.0
|
||||
FloorOdds = Array[float]([0.33, 0.33, 0.33])
|
||||
FilthEater = 0.5
|
||||
Sara = 0.3
|
||||
AgniDemon = 0.3
|
||||
GoldSproingy = 0.05
|
||||
|
||||
[node name="Floor05" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("2_00xd7")
|
||||
FolderName = "Floor05"
|
||||
FloorOdds = Array[float]([1.0])
|
||||
Sproingy = 1.0
|
||||
FloorOdds = Array[float]([0.5, 0.5])
|
||||
FilthEater = 0.25
|
||||
Sara = 0.5
|
||||
Ballos = 0.4
|
||||
AgniDemon = 0.5
|
||||
GoldSproingy = 0.05
|
||||
|
||||
[node name="Floor06" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("2_00xd7")
|
||||
FolderName = "Floor06"
|
||||
FloorOdds = Array[float]([0.2, 0.8, 0.5, 0.1])
|
||||
Sproingy = 1.0
|
||||
Sara = 0.5
|
||||
Ballos = 0.5
|
||||
AgniDemon = 0.5
|
||||
GoldSproingy = 0.05
|
||||
|
||||
[node name="Floor07" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("2_00xd7")
|
||||
FolderName = "Floor07"
|
||||
FloorOdds = Array[float]([1.0])
|
||||
Sproingy = 1.0
|
||||
FloorOdds = Array[float]([0.33, 0.33, 0.33])
|
||||
Sara = 0.1
|
||||
Ballos = 0.5
|
||||
Chariot = 0.5
|
||||
AgniDemon = 0.4
|
||||
GoldSproingy = 0.05
|
||||
|
||||
[node name="Boss Floor 1" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("3_v14r0")
|
||||
@@ -139,32 +156,54 @@ FloorName = 2
|
||||
[node name="Floor09" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("2_00xd7")
|
||||
FolderName = "Floor09"
|
||||
FloorOdds = Array[float]([1.0])
|
||||
Sproingy = 1.0
|
||||
FloorOdds = Array[float]([0.5, 0.5])
|
||||
Chariot = 0.5
|
||||
Chinthe = 0.5
|
||||
GreenAmbassador = 0.1
|
||||
|
||||
[node name="Floor10" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("2_00xd7")
|
||||
FolderName = "Floor10"
|
||||
FloorOdds = Array[float]([0.5, 0.5])
|
||||
Chariot = 0.5
|
||||
Chinthe = 0.5
|
||||
GreenAmbassador = 0.5
|
||||
ShieldOfHeaven = 0.1
|
||||
|
||||
[node name="Floor11" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("2_00xd7")
|
||||
FolderName = "Floor11"
|
||||
FloorOdds = Array[float]([1.0])
|
||||
Sproingy = 1.0
|
||||
FloorOdds = Array[float]([0.5, 0.5])
|
||||
Chinthe = 0.5
|
||||
GreenAmbassador = 0.5
|
||||
ShieldOfHeaven = 0.5
|
||||
|
||||
[node name="Floor12" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("2_00xd7")
|
||||
FolderName = "Floor12"
|
||||
FloorOdds = Array[float]([1.0])
|
||||
Sproingy = 1.0
|
||||
FloorOdds = Array[float]([0.5, 0.5])
|
||||
GreenAmbassador = 0.5
|
||||
SteelAmbassador = 0.05
|
||||
ShieldOfHeaven = 0.5
|
||||
|
||||
[node name="Floor13" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("2_00xd7")
|
||||
FolderName = "Floor13"
|
||||
FloorOdds = Array[float]([1.0])
|
||||
FloorOdds = Array[float]([0.5, 0.5])
|
||||
Sproingy = 1.0
|
||||
GreenAmbassador = 0.25
|
||||
SteelAmbassador = 0.05
|
||||
Palan = 0.3
|
||||
ShieldOfHeaven = 0.5
|
||||
|
||||
[node name="Floor14" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("2_00xd7")
|
||||
FolderName = "Floor14"
|
||||
FloorOdds = Array[float]([1.0])
|
||||
Sproingy = 1.0
|
||||
FloorOdds = Array[float]([0.5, 0.5])
|
||||
SteelAmbassador = 0.05
|
||||
Palan = 0.5
|
||||
ShieldOfHeaven = 0.5
|
||||
GoldSproingy = 0.05
|
||||
|
||||
[node name="Floor15" type="Node" parent="MapOrder"]
|
||||
script = ExtResource("2_00xd7")
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -576,6 +576,7 @@ sprite_frames = SubResource("SpriteFrames_s0p2a")
|
||||
autoplay = "default"
|
||||
|
||||
[node name="FLAME1" type="AudioStreamPlayer3D" parent="VFX/Flame1"]
|
||||
process_mode = 3
|
||||
transform = Transform3D(1.62602, 0, 0, 0, 2.24719, 0, 0, 0, 2.24719, -0.237626, -1.0051, -0.623936)
|
||||
stream = ExtResource("6_54fgm")
|
||||
autoplay = true
|
||||
@@ -599,6 +600,7 @@ sprite_frames = SubResource("SpriteFrames_s0p2a")
|
||||
autoplay = "default"
|
||||
|
||||
[node name="FLAME2" type="AudioStreamPlayer3D" parent="VFX/Flame2"]
|
||||
process_mode = 3
|
||||
transform = Transform3D(1.62602, 0, 0, 0, 2.24719, 0, 0, 0, 2.24719, -0.237626, -1.0051, -0.623936)
|
||||
stream = ExtResource("6_54fgm")
|
||||
autoplay = true
|
||||
|
||||
@@ -409,7 +409,7 @@ tracks/1/keys = {
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("../Lights/OmniLight3D:light_energy")
|
||||
tracks/2/path = NodePath("../../Lights/OmniLight3D:light_energy")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
@@ -421,7 +421,7 @@ tracks/2/keys = {
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("../Lights/OmniLight3D2:light_energy")
|
||||
tracks/3/path = NodePath("../../Lights/OmniLight3D2:light_energy")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
@@ -460,7 +460,7 @@ tracks/1/keys = {
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("../Lights/OmniLight3D:light_energy")
|
||||
tracks/2/path = NodePath("../../Lights/OmniLight3D:light_energy")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
@@ -584,7 +584,7 @@ mesh = SubResource("PlaneMesh_kx0t3")
|
||||
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="Lights"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.50137, 4.05861, 0.0702511)
|
||||
light_energy = 6.02043
|
||||
light_energy = 6.436
|
||||
shadow_enabled = true
|
||||
shadow_blur = 10.0
|
||||
omni_range = 20.929
|
||||
@@ -592,7 +592,7 @@ omni_attenuation = 1.346
|
||||
|
||||
[node name="OmniLight3D2" type="OmniLight3D" parent="Lights"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.6103, 4.13878, 0.141568)
|
||||
light_energy = 6.02043
|
||||
light_energy = 6.436
|
||||
shadow_enabled = true
|
||||
shadow_blur = 10.0
|
||||
omni_range = 20.929
|
||||
|
||||
@@ -134,5 +134,6 @@ label_settings = SubResource("LabelSettings_75ec6")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="CenterContainer/SubViewportContainer/SubViewport"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -869, 0)
|
||||
layers = 2
|
||||
mesh = SubResource("QuadMesh_75ec6")
|
||||
|
||||
Reference in New Issue
Block a user