2-24-16 build changes
This commit is contained in:
@@ -10,6 +10,8 @@ public partial class ItemRescue : Area3D
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
private bool _transferUsed = false;
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
BodyEntered += OnItemRescueEntered;
|
||||
@@ -24,10 +26,12 @@ public partial class ItemRescue : Area3D
|
||||
thrownItem.RescueItem();
|
||||
|
||||
BodyEntered -= OnItemRescueEntered;
|
||||
_transferUsed = true;
|
||||
}
|
||||
|
||||
public void OnExitTree()
|
||||
{
|
||||
BodyEntered -= OnItemRescueEntered;
|
||||
if (!_transferUsed)
|
||||
BodyEntered -= OnItemRescueEntered;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user