mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +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)
|
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);
|
result = new TypeMetaDataCached(type);
|
||||||
_metaCache.Add(type, result);
|
_metaCache.Add(type, result);
|
||||||
@ -528,7 +528,7 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if(_typeMetaData == null)
|
if (_typeMetaData == null)
|
||||||
{
|
{
|
||||||
_typeMetaData = new TypeMetaData(
|
_typeMetaData = new TypeMetaData(
|
||||||
Type,
|
Type,
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
using DCFApixels.DragonECS.Internal;
|
using DCFApixels.DragonECS.Internal;
|
||||||
using DCFApixels.DragonECS.RunnersCore;
|
using DCFApixels.DragonECS.RunnersCore;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using static DCFApixels.DragonECS.EcsDebugUtility;
|
using static DCFApixels.DragonECS.EcsDebugUtility;
|
||||||
|
|
||||||
namespace DCFApixels.DragonECS
|
namespace DCFApixels.DragonECS
|
||||||
|
@ -36,20 +36,20 @@ namespace DCFApixels.DragonECS
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
/// <summary>A pool for struct components.</summary>
|
/// <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 T Add(int entityID);
|
||||||
ref readonly T Read(int entityID);
|
ref readonly T Read(int entityID);
|
||||||
ref T Get(int entityID);
|
ref T Get(int entityID);
|
||||||
}
|
}
|
||||||
/// <summary>A pool for reference components of type T that instantiates components itself.</summary>
|
/// <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 Add(int entityID);
|
||||||
T Get(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>
|
/// <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);
|
void Add(int entityID, T component);
|
||||||
T Get(int entityID);
|
T Get(int entityID);
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
using DCFApixels.DragonECS.Internal;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
Loading…
Reference in New Issue
Block a user