Made trash object delete its entity when collected
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Babushka.scripts.CSharp.GameEntity.Entities;
|
||||
using Babushka.scripts.CSharp.GameEntity.Management;
|
||||
using Godot;
|
||||
|
||||
namespace Babushka.scripts.CSharp.GameEntity.EntityNodes;
|
||||
@@ -9,8 +10,11 @@ public partial class TrashEntityNode : Node2D
|
||||
|
||||
public void Initialize(TrashEntity trashEntity)
|
||||
{
|
||||
_trashEntity = trashEntity;
|
||||
_trashEntity = trashEntity;
|
||||
}
|
||||
|
||||
public void Collect()
|
||||
{
|
||||
EntityManager.Instance.RemoveEntity(_trashEntity);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user