Fix dropped/thrown item behavior
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user