Fix level up, fix gallery room height, fix enemy heights, fix gospel of dimension spawn height, put minimap on right visual layer for some floors, add script to floor scene file
This commit is contained in:
@@ -207,7 +207,7 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
|
||||
var spawnPointsGodotCollection = new Godot.Collections.Array<Marker3D>(spawnPoints);
|
||||
var randomSpawnPoint = spawnPointsGodotCollection.PickRandom();
|
||||
|
||||
GlobalPosition = randomSpawnPoint.GlobalPosition;
|
||||
GlobalPosition = new Vector3(randomSpawnPoint.GlobalPosition.X, 0, randomSpawnPoint.GlobalPosition.Y);
|
||||
_previousPosition = GlobalPosition;
|
||||
|
||||
if (this is IHavePatrolBehavior patrolEnemy)
|
||||
|
||||
@@ -33,7 +33,7 @@ public abstract partial class Enemy2D : Enemy
|
||||
if (_enemyLogic.Value is EnemyLogic.State.FollowPlayer || _enemyLogic.Value is EnemyLogic.State.Patrolling)
|
||||
{
|
||||
var velocity = (GlobalPosition - _previousPosition) / (float)delta;
|
||||
if (velocity.IsZeroApprox())
|
||||
if (velocity.Length() < 0.3f)
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Idle());
|
||||
else
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Move());
|
||||
|
||||
@@ -84,18 +84,12 @@ public abstract partial class EnemyModelView : Node3D, IEnemyModelView
|
||||
|
||||
public virtual void PlayIdleAnimation()
|
||||
{
|
||||
if (!AnimationTree.HasAnimation("idle_front"))
|
||||
return;
|
||||
|
||||
_walkSFX.Stop();
|
||||
_stateMachine.Travel(_idleName, false);
|
||||
}
|
||||
|
||||
public virtual void PlayWalkAnimation()
|
||||
{
|
||||
if (!AnimationTree.HasAnimation("idle_front_walking"))
|
||||
return;
|
||||
|
||||
if (!_walkSFX.Playing)
|
||||
_walkSFX.Play();
|
||||
_stateMachine.Travel(_walkingName, false);
|
||||
|
||||
@@ -38,6 +38,7 @@ public partial class FilthEater : Enemy2D, IHavePatrolBehavior, IHaveEngagePlaye
|
||||
|
||||
public void OnResolved()
|
||||
{
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Activate());
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Patrol());
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,13 @@ radius = 1.0
|
||||
script = ExtResource("4_5eid5")
|
||||
Name = "Filth Eater"
|
||||
Description = "This guy grosses me out."
|
||||
MaximumHP = ""
|
||||
ATK = ""
|
||||
DEF = ""
|
||||
Affinity = ""
|
||||
Weakness = ""
|
||||
Drop1 = ""
|
||||
Drop2 = ""
|
||||
metadata/_custom_type_script = ExtResource("4_5eid5")
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_qbmfg"]
|
||||
@@ -41,7 +48,7 @@ script = ExtResource("1_p438s")
|
||||
|
||||
[node name="LineOfSight" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.56859, 0)
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
|
||||
@@ -51,15 +58,17 @@ shape = SubResource("CylinderShape3D_jbgmx")
|
||||
|
||||
[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, 0, 0)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.56859, 0)
|
||||
shape = SubResource("CapsuleShape3D_cwfph")
|
||||
|
||||
[node name="Raycast" type="RayCast3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.56859, 0)
|
||||
target_position = Vector3(0, 0, -5)
|
||||
collision_mask = 3
|
||||
|
||||
[node name="Collision" type="Area3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.56859, 0)
|
||||
collision_layer = 2048
|
||||
collision_mask = 0
|
||||
|
||||
@@ -69,10 +78,12 @@ shape = SubResource("SphereShape3D_0y048")
|
||||
|
||||
[node name="EnemyModelView" parent="." instance=ExtResource("3_rrwed")]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.06859, 0)
|
||||
EnemyLoreInfo = SubResource("Resource_fv5vf")
|
||||
|
||||
[node name="PlayerDetector" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.56859, 0)
|
||||
collision_layer = 0
|
||||
collision_mask = 34
|
||||
|
||||
@@ -81,6 +92,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.179932, 0)
|
||||
shape = SubResource("CylinderShape3D_qbmfg")
|
||||
|
||||
[node name="Components" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.56859, 0)
|
||||
|
||||
[node name="PatrolBehavior" parent="Components" instance=ExtResource("5_pvjvo")]
|
||||
unique_name_in_owner = true
|
||||
@@ -99,6 +111,7 @@ avoidance_enabled = true
|
||||
radius = 1.0
|
||||
|
||||
[node name="HitSounds" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.56859, 0)
|
||||
|
||||
[node name="AbsorbSFX" type="AudioStreamPlayer3D" parent="HitSounds"]
|
||||
unique_name_in_owner = true
|
||||
|
||||
@@ -1919,7 +1919,7 @@ states/Start/position = Vector2(198, 100)
|
||||
states/Walking/node = ExtResource("197_mno7m")
|
||||
states/Walking/position = Vector2(588, 100)
|
||||
transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_u5xjp"), "Primary Attack", "Idle", SubResource("AnimationNodeStateMachineTransition_5cwnl"), "Idle", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_e0gee"), "Idle", "Walking", SubResource("AnimationNodeStateMachineTransition_mno7m"), "Walking", "Idle", SubResource("AnimationNodeStateMachineTransition_4h5gj"), "Idle", "Secondary Attack", SubResource("AnimationNodeStateMachineTransition_e5pq0"), "Secondary Attack", "Idle", SubResource("AnimationNodeStateMachineTransition_wka7s"), "Walking", "Secondary Attack", SubResource("AnimationNodeStateMachineTransition_8jscc"), "Walking", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_7vrs0")]
|
||||
graph_offset = Vector2(-32, 46)
|
||||
graph_offset = Vector2(226.043, 46)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_smxxh"]
|
||||
atlas = ExtResource("194_pyy2h")
|
||||
|
||||
@@ -36,10 +36,11 @@ script = ExtResource("1_3ejdn")
|
||||
|
||||
[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, 0, 0)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.95329, 0)
|
||||
shape = SubResource("CapsuleShape3D_cwfph")
|
||||
|
||||
[node name="Collision" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.95329, 0)
|
||||
|
||||
[node name="Collision" type="Area3D" parent="Collision"]
|
||||
collision_layer = 2048
|
||||
@@ -50,7 +51,7 @@ shape = SubResource("SphereShape3D_8vcnq")
|
||||
|
||||
[node name="LineOfSight" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.95329, 0)
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
|
||||
@@ -65,12 +66,14 @@ target_position = Vector3(0, 0, -5)
|
||||
collision_mask = 3
|
||||
|
||||
[node name="Visual" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.95329, 0)
|
||||
|
||||
[node name="EnemyModelView" parent="Visual" instance=ExtResource("4_82s0m")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="PlayerDetector" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.95329, 0)
|
||||
collision_layer = 0
|
||||
collision_mask = 34
|
||||
|
||||
@@ -78,6 +81,7 @@ collision_mask = 34
|
||||
shape = SubResource("CylinderShape3D_746fv")
|
||||
|
||||
[node name="Components" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.95329, 0)
|
||||
|
||||
[node name="PatrolBehavior" parent="Components" instance=ExtResource("4_8ymq6")]
|
||||
unique_name_in_owner = true
|
||||
@@ -96,6 +100,7 @@ avoidance_enabled = true
|
||||
radius = 1.0
|
||||
|
||||
[node name="HitSounds" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.95329, 0)
|
||||
|
||||
[node name="AbsorbSFX" type="AudioStreamPlayer3D" parent="HitSounds"]
|
||||
unique_name_in_owner = true
|
||||
@@ -122,7 +127,7 @@ stream = ExtResource("10_ddchx")
|
||||
bus = &"SFX"
|
||||
|
||||
[node name="Shadow" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(0.925, 0, 0, 0, -4.0433e-08, 0.925, 0, -0.925, -4.0433e-08, 0.00393164, -1.00089, 0.0077811)
|
||||
transform = Transform3D(0.925, 0, 0, 0, -4.0433e-08, 0.925, 0, -0.925, -4.0433e-08, 0.00393164, 0.101466, 0.0077811)
|
||||
transparency = 0.1
|
||||
cast_shadow = 0
|
||||
modulate = Color(1, 1, 1, 0.591)
|
||||
|
||||
@@ -33,12 +33,12 @@ script = ExtResource("1_iy2fp")
|
||||
|
||||
[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, 0, 0)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2, 0)
|
||||
shape = SubResource("CapsuleShape3D_cwfph")
|
||||
|
||||
[node name="LineOfSight" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2, 0)
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
|
||||
@@ -53,6 +53,7 @@ target_position = Vector3(0, 0, -5)
|
||||
collision_mask = 3
|
||||
|
||||
[node name="Collision" type="Area3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
|
||||
collision_layer = 2048
|
||||
collision_mask = 0
|
||||
|
||||
@@ -61,9 +62,11 @@ shape = SubResource("SphereShape3D_8vcnq")
|
||||
|
||||
[node name="EnemyModelView" parent="." instance=ExtResource("2_v2urn")]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
|
||||
|
||||
[node name="PlayerDetector" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
|
||||
collision_layer = 0
|
||||
collision_mask = 34
|
||||
|
||||
@@ -71,6 +74,7 @@ collision_mask = 34
|
||||
shape = SubResource("CylinderShape3D_jhnwb")
|
||||
|
||||
[node name="Components" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
|
||||
|
||||
[node name="PatrolBehavior" parent="Components" instance=ExtResource("4_bjnvx")]
|
||||
unique_name_in_owner = true
|
||||
@@ -92,6 +96,7 @@ avoidance_enabled = true
|
||||
radius = 1.0
|
||||
|
||||
[node name="HitSounds" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
|
||||
|
||||
[node name="AbsorbSFX" type="AudioStreamPlayer3D" parent="HitSounds"]
|
||||
unique_name_in_owner = true
|
||||
|
||||
@@ -1537,7 +1537,7 @@ autoplay = true
|
||||
bus = &"SFX"
|
||||
|
||||
[node name="Shadow" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.265, 0, 0, 0, -5.52949e-08, 1.265, 0, -1.265, -5.52949e-08, 0.00393164, -1.31885, 0.0077811)
|
||||
transform = Transform3D(1.265, 0, 0, 0, -5.52949e-08, 1.265, 0, -1.265, -5.52949e-08, 0.00393164, -1.88689, 0.0077811)
|
||||
transparency = 0.1
|
||||
cast_shadow = 0
|
||||
modulate = Color(1, 1, 1, 0.591)
|
||||
|
||||
@@ -33,12 +33,12 @@ script = ExtResource("1_e2477")
|
||||
|
||||
[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, 0, 0)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.47389, 0)
|
||||
shape = SubResource("CapsuleShape3D_cwfph")
|
||||
|
||||
[node name="LineOfSight" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.47389, 0)
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
|
||||
@@ -53,6 +53,7 @@ target_position = Vector3(0, 0, -5)
|
||||
collision_mask = 3
|
||||
|
||||
[node name="Collision" type="Area3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.47389, 0)
|
||||
collision_layer = 2048
|
||||
collision_mask = 0
|
||||
|
||||
@@ -61,9 +62,11 @@ shape = SubResource("SphereShape3D_8vcnq")
|
||||
|
||||
[node name="EnemyModelView" parent="." instance=ExtResource("3_tbkej")]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.47389, 0)
|
||||
|
||||
[node name="PlayerDetector" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.47389, 0)
|
||||
collision_layer = 0
|
||||
collision_mask = 34
|
||||
|
||||
@@ -71,6 +74,7 @@ collision_mask = 34
|
||||
shape = SubResource("CylinderShape3D_tbkej")
|
||||
|
||||
[node name="Components" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.47389, 0)
|
||||
|
||||
[node name="PatrolBehavior" parent="Components" instance=ExtResource("4_dxxe5")]
|
||||
unique_name_in_owner = true
|
||||
@@ -89,6 +93,7 @@ avoidance_enabled = true
|
||||
radius = 1.0
|
||||
|
||||
[node name="HitSounds" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.47389, 0)
|
||||
|
||||
[node name="AbsorbSFX" type="AudioStreamPlayer3D" parent="HitSounds"]
|
||||
unique_name_in_owner = true
|
||||
|
||||
@@ -39,11 +39,4 @@ public partial class GoldSproingy : Enemy2D, IHavePatrolBehavior, IHaveFleeBehav
|
||||
}
|
||||
|
||||
public override void Move() => EnemyModelView.PlayIdleAnimation();
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
PatrolBehavior.OnVelocityComputed -= OnVelocityComputed;
|
||||
PlayerDetector.BodyEntered -= PlayerDetector_BodyEntered;
|
||||
PlayerDetector.BodyExited -= PlayerDetector_BodyExited;
|
||||
}
|
||||
}
|
||||
@@ -42,10 +42,11 @@ script = ExtResource("1_o1o4d")
|
||||
|
||||
[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, 0, 0)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2.09874, 0)
|
||||
shape = SubResource("CapsuleShape3D_cwfph")
|
||||
|
||||
[node name="Collision" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.09874, 0)
|
||||
|
||||
[node name="Collision" type="Area3D" parent="Collision"]
|
||||
collision_layer = 2048
|
||||
@@ -83,11 +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, 2.09874, 0)
|
||||
|
||||
[node name="EnemyModelView" parent="Visual" instance=ExtResource("2_o1o4d")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="Components" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.09874, 0)
|
||||
|
||||
[node name="PatrolBehavior" parent="Components" instance=ExtResource("3_dxqkk")]
|
||||
unique_name_in_owner = true
|
||||
@@ -101,6 +104,7 @@ avoidance_enabled = true
|
||||
radius = 1.0
|
||||
|
||||
[node name="SFX" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.09874, 0)
|
||||
|
||||
[node name="AbsorbSFX" type="AudioStreamPlayer3D" parent="SFX"]
|
||||
unique_name_in_owner = true
|
||||
|
||||
Reference in New Issue
Block a user