mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-18 01:54:35 +08:00
Update AutoEntityCreator.cs
This commit is contained in:
parent
e5f44eb23a
commit
e7ff0685bb
@ -60,23 +60,20 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
private void CreateEntity()
|
private void CreateEntity()
|
||||||
{
|
{
|
||||||
if (_created)
|
if (_created) { return; }
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (_world == null)
|
if (_world == null)
|
||||||
{
|
{
|
||||||
AutoResolveWorldProviderDependensy();
|
AutoResolveWorldProviderDependensy();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
InitConnect(_connect, _world.GetRaw());
|
InitConnect(_connect, _world.GetRaw());
|
||||||
}
|
|
||||||
_created = true;
|
_created = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitConnect(EcsEntityConnect connect, EcsWorld world)
|
private void InitConnect(EcsEntityConnect connect, EcsWorld world)
|
||||||
{
|
{
|
||||||
|
if (connect.IsConnected) { return; }
|
||||||
connect.ConnectWith(CreateEntity(world), true);
|
connect.ConnectWith(CreateEntity(world), true);
|
||||||
}
|
}
|
||||||
protected virtual entlong CreateEntity(EcsWorld world)
|
protected virtual entlong CreateEntity(EcsWorld world)
|
||||||
|
Loading…
Reference in New Issue
Block a user