Fix dropped/thrown item behavior

This commit is contained in:
2026-02-10 14:57:41 -08:00
parent fdc4a6f2c1
commit 97198afe18
1138 changed files with 20375 additions and 4110 deletions

View File

@@ -238,7 +238,7 @@ public partial class Game : Node3D, IGame
var droppedScene = GD.Load<PackedScene>("res://src/items/dropped/DroppedItem.tscn");
var dropped = droppedScene.Instantiate<DroppedItem>();
dropped.Item = item;
AddChild(dropped);
_map.AddChild(dropped);
dropped.Drop();
}
@@ -246,7 +246,7 @@ public partial class Game : Node3D, IGame
{
var setScene = GD.Load<PackedScene>("res://src/items/misc/SetItem.tscn");
var setItem = setScene.Instantiate<SetItem>();
AddChild(setItem);
_map.AddChild(setItem);
setItem.Set();
}
@@ -255,8 +255,7 @@ public partial class Game : Node3D, IGame
var thrownScene = GD.Load<PackedScene>("res://src/items/thrown/ThrownItem.tscn");
var thrown = thrownScene.Instantiate<ThrownItem>();
thrown.ItemThatIsThrown = item;
AddChild(thrown);
thrown.Position += new Vector3(0, 1.5f, 0);
_map.AddChild(thrown);
thrown.Throw(_effectService);
}