Remove old project and continue improving ecs.
Updated packages version; Removed Ghost.SparseEntities; Added new EntityQuery.EntityComponentIterator; Added new thread local command buffer in World; Changed commands in EntityCommandBuffer from UnsafeList<Command> to UnsafeList<byte> for better performance; Changed the name of IJobEntityParallel to IJobEntity;
This commit is contained in:
@@ -19,9 +19,7 @@ public readonly ref struct SystemAPI
|
||||
public interface ISystem
|
||||
{
|
||||
void Initialize(ref readonly SystemAPI systemAPI);
|
||||
void PreUpdate(ref readonly SystemAPI systemAPI);
|
||||
void Update(ref readonly SystemAPI systemAPI);
|
||||
void PostUpdate(ref readonly SystemAPI systemAPI);
|
||||
void Cleanup(ref readonly SystemAPI systemAPI);
|
||||
}
|
||||
|
||||
@@ -207,16 +205,6 @@ public abstract class SystemGroup : ISystem
|
||||
}
|
||||
}
|
||||
|
||||
public void PreUpdate(ref readonly SystemAPI systemAPI)
|
||||
{
|
||||
ThrowIfNotSorted();
|
||||
|
||||
foreach (var system in _sortedSystems!)
|
||||
{
|
||||
system.PreUpdate(in systemAPI);
|
||||
}
|
||||
}
|
||||
|
||||
public void Update(ref readonly SystemAPI systemAPI)
|
||||
{
|
||||
ThrowIfNotSorted();
|
||||
@@ -227,16 +215,6 @@ public abstract class SystemGroup : ISystem
|
||||
}
|
||||
}
|
||||
|
||||
public void PostUpdate(ref readonly SystemAPI systemAPI)
|
||||
{
|
||||
ThrowIfNotSorted();
|
||||
|
||||
foreach (var system in _sortedSystems!)
|
||||
{
|
||||
system.PostUpdate(in systemAPI);
|
||||
}
|
||||
}
|
||||
|
||||
public void Cleanup(ref readonly SystemAPI systemAPI)
|
||||
{
|
||||
ThrowIfNotSorted();
|
||||
@@ -282,4 +260,28 @@ public class SystemManager
|
||||
|
||||
throw new InvalidOperationException($"System of type {typeof(T).FullName} not found in SystemManager.");
|
||||
}
|
||||
|
||||
internal void InitializeAll(ref readonly SystemAPI systemAPI)
|
||||
{
|
||||
foreach (var system in _systems)
|
||||
{
|
||||
system.Initialize(in systemAPI);
|
||||
}
|
||||
}
|
||||
|
||||
internal void UpdateAll(ref readonly SystemAPI systemAPI)
|
||||
{
|
||||
foreach (var system in _systems)
|
||||
{
|
||||
system.Update(in systemAPI);
|
||||
}
|
||||
}
|
||||
|
||||
internal void CleanupAll(ref readonly SystemAPI systemAPI)
|
||||
{
|
||||
foreach (var system in _systems)
|
||||
{
|
||||
system.Cleanup(in systemAPI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user