mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 18:14:37 +08:00
simple refactoring
This commit is contained in:
parent
6c449c94f6
commit
659b7fdb64
@ -1,5 +1,4 @@
|
||||
using DCFApixels.DragonECS.Internal;
|
||||
using DCFApixels.DragonECS.Utils;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
@ -6,7 +6,7 @@ using System.Runtime.CompilerServices;
|
||||
|
||||
namespace DCFApixels.DragonECS
|
||||
{
|
||||
public abstract partial class EcsWorld: IEntityStorage
|
||||
public abstract partial class EcsWorld : IEntityStorage
|
||||
{
|
||||
public readonly short id;
|
||||
private IEcsWorldConfig _config;
|
||||
@ -195,7 +195,7 @@ namespace DCFApixels.DragonECS
|
||||
#endregion
|
||||
|
||||
#region Where Query
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Entity
|
||||
@ -239,7 +239,7 @@ namespace DCFApixels.DragonECS
|
||||
public void DelEntity(int entityID)
|
||||
{
|
||||
#if DEBUG
|
||||
if(IsUsed(entityID) == false)
|
||||
if (IsUsed(entityID) == false)
|
||||
{
|
||||
Throw.UndefinedException();
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ namespace DCFApixels.DragonECS
|
||||
EcsSpan result;
|
||||
if (_lastWorldVersion != World.Version)
|
||||
{
|
||||
result = _aspect.GetIteratorFor(span).CopyToSpan(ref _filteredEntities);
|
||||
result = _aspect.GetIteratorFor(span).CopyToSpan(ref _filteredEntities);
|
||||
_lastWorldVersion = World.Version;
|
||||
}
|
||||
else
|
||||
|
@ -33,7 +33,7 @@
|
||||
#endregion
|
||||
|
||||
#region WhereToGroup
|
||||
public static EcsReadonlyGroup WhereToGroup<TCollection ,TAspect>(this TCollection entities, out TAspect aspect)
|
||||
public static EcsReadonlyGroup WhereToGroup<TCollection, TAspect>(this TCollection entities, out TAspect aspect)
|
||||
where TAspect : EcsAspect
|
||||
where TCollection : IEntityStorage
|
||||
{
|
||||
@ -44,7 +44,7 @@
|
||||
{
|
||||
return group.ToSpan().WhereToGroup(out aspect);
|
||||
}
|
||||
public static EcsReadonlyGroup WhereToGroup<TAspect>(this EcsSpan span, out TAspect aspect)
|
||||
public static EcsReadonlyGroup WhereToGroup<TAspect>(this EcsSpan span, out TAspect aspect)
|
||||
where TAspect : EcsAspect
|
||||
{
|
||||
EcsWorld world = span.World;
|
||||
|
@ -1,5 +1,4 @@
|
||||
using DCFApixels.DragonECS.Utils;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
Loading…
Reference in New Issue
Block a user