Fixed item spawn locations, make filth eater stop firing animation on death

This commit is contained in:
2026-03-02 14:35:48 -08:00
parent 28f38d236e
commit c4150e78fa
4 changed files with 15 additions and 5 deletions

View File

@@ -35,7 +35,7 @@ public abstract partial class Enemy2D : Enemy
if (_enemyLogic.Value is EnemyLogic.State.FollowPlayer || _enemyLogic.Value is EnemyLogic.State.Patrolling) if (_enemyLogic.Value is EnemyLogic.State.FollowPlayer || _enemyLogic.Value is EnemyLogic.State.Patrolling)
{ {
var velocity = (GlobalPosition - _previousPosition) / (float)delta; var velocity = (GlobalPosition - _previousPosition) / (float)delta;
if (velocity.Length() < 0.3f) if (velocity.Length() < 0.15f)
_enemyLogic.Input(new EnemyLogic.Input.Idle()); _enemyLogic.Input(new EnemyLogic.Input.Idle());
else else
_enemyLogic.Input(new EnemyLogic.Input.Move()); _enemyLogic.Input(new EnemyLogic.Input.Move());

View File

@@ -1098,6 +1098,18 @@ tracks/4/keys = {
"update": 0, "update": 0,
"values": [1.0] "values": [1.0]
} }
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("attack VFX:frame")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_b1kem"] [sub_resource type="Animation" id="Animation_b1kem"]
resource_name = "idle_back" resource_name = "idle_back"

View File

@@ -1,7 +1,6 @@
[gd_scene load_steps=5 format=3 uid="uid://bg3654q6tmtbk"] [gd_scene load_steps=4 format=3 uid="uid://bg3654q6tmtbk"]
[ext_resource type="Script" uid="uid://bq8aaf1ae4afh" path="res://src/items/weapons/Weapon.cs" id="1_7pkyf"] [ext_resource type="Script" uid="uid://bq8aaf1ae4afh" path="res://src/items/weapons/Weapon.cs" id="1_7pkyf"]
[ext_resource type="Texture2D" uid="uid://bnkshsssabl0" path="res://src/items/weapons/textures/Air Sword.png" id="2_udu2u"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_1051i"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_1051i"]
height = 0.725098 height = 0.725098
@@ -32,7 +31,6 @@ unique_name_in_owner = true
pixel_size = 0.005 pixel_size = 0.005
billboard = 2 billboard = 2
texture_filter = 0 texture_filter = 0
texture = ExtResource("2_udu2u")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
shape = SubResource("CapsuleShape3D_wll7p") shape = SubResource("CapsuleShape3D_wll7p")

View File

@@ -65,7 +65,7 @@ public partial class MonsterRoom : DungeonRoom
var selectedItem = database.PickItem<IBaseInventoryItem>() as Node3D; var selectedItem = database.PickItem<IBaseInventoryItem>() as Node3D;
var duplicated = selectedItem.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D; var duplicated = selectedItem.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D;
duplicated.GlobalPosition = new Vector3(spawnPoint.GlobalPosition.X, 0, spawnPoint.GlobalPosition.Z); duplicated.Position = new Vector3(spawnPoint.Position.X, 0, spawnPoint.Position.Z);
AddChild(duplicated); AddChild(duplicated);
} }
} }