refactoring2
This commit is contained in:
@@ -91,7 +91,27 @@ namespace Simulator.Data.Transport
|
||||
|
||||
public override void SetEntity(string key, string name = "")
|
||||
{
|
||||
PlaceNext(EntityManager.Instance.GetEntity(key, this, name));
|
||||
PlaceNext(EntityManager.Instance.GetEntity(key, name));
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (EntityManager.Instance != null)
|
||||
EntityManager.Instance.OnEntityTransferred += HandleEntityTransferred;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
if (EntityManager.Instance != null)
|
||||
EntityManager.Instance.OnEntityTransferred -= HandleEntityTransferred;
|
||||
}
|
||||
|
||||
private void HandleEntityTransferred(Entity entity)
|
||||
{
|
||||
if (possessEntities.Contains(entity))
|
||||
{
|
||||
DecreaseEntity(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadEntity(DataObject agvData)
|
||||
|
||||
Reference in New Issue
Block a user