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()
|
||||
{
|
||||
if (_created)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (_created) { return; }
|
||||
|
||||
if (_world == null)
|
||||
{
|
||||
AutoResolveWorldProviderDependensy();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
InitConnect(_connect, _world.GetRaw());
|
||||
}
|
||||
_created = true;
|
||||
}
|
||||
|
||||
private void InitConnect(EcsEntityConnect connect, EcsWorld world)
|
||||
{
|
||||
if (connect.IsConnected) { return; }
|
||||
connect.ConnectWith(CreateEntity(world), true);
|
||||
}
|
||||
protected virtual entlong CreateEntity(EcsWorld world)
|
||||
|
Loading…
Reference in New Issue
Block a user