mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-17 17:34:36 +08:00
Merge branch 'new_dev' of https://github.com/DCFApixels/DragonECS into new_dev
This commit is contained in:
commit
278ce467e5
@ -397,7 +397,7 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
public static TypeMetaDataCached GetCachedTypeMeta(Type type)
|
||||
{
|
||||
if(_metaCache.TryGetValue(type, out TypeMetaDataCached result) == false)
|
||||
if (_metaCache.TryGetValue(type, out TypeMetaDataCached result) == false)
|
||||
{
|
||||
result = new TypeMetaDataCached(type);
|
||||
_metaCache.Add(type, result);
|
||||
@ -438,7 +438,7 @@ namespace DCFApixels.DragonECS
|
||||
this.group = group;
|
||||
this.color = color;
|
||||
this.description = description;
|
||||
this.tags = tags;
|
||||
this.tags = tags;
|
||||
}
|
||||
}
|
||||
|
||||
@ -528,7 +528,7 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_typeMetaData == null)
|
||||
if (_typeMetaData == null)
|
||||
{
|
||||
_typeMetaData = new TypeMetaData(
|
||||
Type,
|
||||
|
@ -1,9 +1,7 @@
|
||||
using DCFApixels.DragonECS.Internal;
|
||||
using DCFApixels.DragonECS.RunnersCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using static DCFApixels.DragonECS.EcsDebugUtility;
|
||||
|
||||
namespace DCFApixels.DragonECS
|
||||
|
@ -275,7 +275,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private bool HasEntityComponent(int entityID, EcsMaskChunck maskBit)
|
||||
{
|
||||
return (_entityComponentMasks[entityID * _entityComponentMaskLength + maskBit.chankIndex] & maskBit.mask) == maskBit.mask;
|
||||
return (_entityComponentMasks[entityID * _entityComponentMaskLength + maskBit.chankIndex] & maskBit.mask) == maskBit.mask;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -311,7 +311,7 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
return World.TryUnregisterEntityComponent(entityID, componentTypeID, maskBit);
|
||||
}
|
||||
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public int GetComponentCount(int componentTypeID)
|
||||
{
|
||||
|
@ -118,7 +118,7 @@ namespace DCFApixels.DragonECS
|
||||
if (_nodes.TryGetValue(type, out InjectionNodeBase oldNode))
|
||||
{
|
||||
Throw.Exception("Already declared");
|
||||
}
|
||||
}
|
||||
InitNode(injectionProperty);
|
||||
#if !REFLECTION_DISABLED
|
||||
if (IsCanInstantiated(type))
|
||||
|
@ -36,20 +36,20 @@ namespace DCFApixels.DragonECS
|
||||
#endregion
|
||||
}
|
||||
/// <summary>A pool for struct components.</summary>
|
||||
public interface IEcsStructPool<T> : IEcsPool where T: struct
|
||||
public interface IEcsStructPool<T> : IEcsPool where T : struct
|
||||
{
|
||||
ref T Add(int entityID);
|
||||
ref readonly T Read(int entityID);
|
||||
ref T Get(int entityID);
|
||||
}
|
||||
/// <summary>A pool for reference components of type T that instantiates components itself.</summary>
|
||||
public interface IEcsClassPool<T> : IEcsPool where T: class
|
||||
public interface IEcsClassPool<T> : IEcsPool where T : class
|
||||
{
|
||||
T Add(int entityID);
|
||||
T Get(int entityID);
|
||||
}
|
||||
/// <summary>A pool for reference components of type T, which does not instantiate components itself but receives components from external sources..</summary>
|
||||
public interface IEcsHybridPool<T> : IEcsPool where T: class
|
||||
public interface IEcsHybridPool<T> : IEcsPool where T : class
|
||||
{
|
||||
void Add(int entityID, T component);
|
||||
T Get(int entityID);
|
||||
|
@ -1,4 +1,3 @@
|
||||
using DCFApixels.DragonECS.Internal;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
Loading…
Reference in New Issue
Block a user