mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2026-04-22 01:45:55 +08:00
Merge branch 'pr/8' into dev
This commit is contained in:
commit
8901c4fc83
@ -370,6 +370,14 @@ namespace DCFApixels.DragonECS
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Other
|
#region Other
|
||||||
|
public static void ClearCache()
|
||||||
|
{
|
||||||
|
lock (_lock)
|
||||||
|
{
|
||||||
|
_metaCache.Clear();
|
||||||
|
_metaCache.Add(typeof(void), NullTypeMeta);
|
||||||
|
}
|
||||||
|
}
|
||||||
ITypeMeta ITypeMeta.BaseMeta
|
ITypeMeta ITypeMeta.BaseMeta
|
||||||
{
|
{
|
||||||
get { return null; }
|
get { return null; }
|
||||||
|
|||||||
@ -411,6 +411,10 @@ namespace DCFApixels.DragonECS
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Other
|
#region Other
|
||||||
|
public static void ClearCache()
|
||||||
|
{
|
||||||
|
_staticMaskCache.Clear();
|
||||||
|
}
|
||||||
EcsMask IComponentMask.ToMask(EcsWorld world) { return _mask; }
|
EcsMask IComponentMask.ToMask(EcsWorld world) { return _mask; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@ -175,10 +175,6 @@ namespace DCFApixels.DragonECS
|
|||||||
// тут сложно однозначно посчитать, так как нужно еще место под аспекты и запросы
|
// тут сложно однозначно посчитать, так как нужно еще место под аспекты и запросы
|
||||||
int controllersCount = config.PoolsCapacity * 4;
|
int controllersCount = config.PoolsCapacity * 4;
|
||||||
_worldComponentPools = new StructList<WorldComponentPoolAbstract>(controllersCount);
|
_worldComponentPools = new StructList<WorldComponentPoolAbstract>(controllersCount);
|
||||||
if (controllersCount < _allWorldComponentPools.Capacity)
|
|
||||||
{
|
|
||||||
_allWorldComponentPools.Capacity = controllersCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (worldID < 0 || (worldID == NULL_WORLD_ID && nullWorld == false))
|
if (worldID < 0 || (worldID == NULL_WORLD_ID && nullWorld == false))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -147,10 +147,7 @@ namespace DCFApixels.DragonECS
|
|||||||
private static short _recycledItemsCount;
|
private static short _recycledItemsCount;
|
||||||
private static readonly IEcsWorldComponent<T> _interface = EcsWorldComponentHandler<T>.instance;
|
private static readonly IEcsWorldComponent<T> _interface = EcsWorldComponentHandler<T>.instance;
|
||||||
private static readonly Abstract _controller = new Abstract();
|
private static readonly Abstract _controller = new Abstract();
|
||||||
static WorldComponentPool()
|
|
||||||
{
|
|
||||||
_allWorldComponentPools.Add(_controller);
|
|
||||||
}
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static ref T GetItem(int itemIndex)
|
public static ref T GetItem(int itemIndex)
|
||||||
{// ts
|
{// ts
|
||||||
|
|||||||
@ -357,6 +357,12 @@ namespace DCFApixels.DragonECS
|
|||||||
instance.Inject(_injectedData);
|
instance.Inject(_injectedData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static void Clear()
|
||||||
|
{
|
||||||
|
_Empty_Internal._injections.Clear();
|
||||||
|
_Empty_Internal._nodes.Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user