mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
code cleanup
This commit is contained in:
parent
2cbdb4f994
commit
0ed91a08da
@ -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);
|
||||
@ -533,7 +533,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
|
||||
|
@ -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