add meta to pools

This commit is contained in:
Mikhail 2024-05-01 14:29:01 +08:00
parent 4490d1a0b5
commit a8ce4688bc
6 changed files with 8 additions and 6 deletions

View File

@ -1,8 +1,6 @@
using DCFApixels.DragonECS.Internal;
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Xml.Linq;
namespace DCFApixels.DragonECS
{

View File

@ -1,5 +1,4 @@
using System;
using System.Diagnostics;
namespace DCFApixels.DragonECS
{

View File

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text.RegularExpressions;
namespace DCFApixels.DragonECS

View File

@ -9,10 +9,13 @@ namespace DCFApixels.DragonECS
{
/// <summary>Standard component</summary>
public interface IEcsComponent : IEcsComponentType { }
#if ENABLE_IL2CPP
using Unity.IL2CPP.CompilerServices;
[Il2CppSetOption (Option.NullChecks, false)]
#endif
[MetaColor(MetaColor.DragonRose)]
[MetaGroup(EcsConsts.FRAMEWORK_NAME)]
/// <summary>Pool for IEcsComponent components</summary>
public sealed class EcsPool<T> : IEcsPoolImplementation<T>, IEcsStructPool<T>, IEnumerable<T> //IEnumerable<T> - IntelliSense hack
where T : struct, IEcsComponent

View File

@ -9,10 +9,14 @@ namespace DCFApixels.DragonECS
{
/// <summary>Component without data</summary>
public interface IEcsTagComponent : IEcsComponentType { }
#if ENABLE_IL2CPP
using Unity.IL2CPP.CompilerServices;
[Il2CppSetOption (Option.NullChecks, false)]
#endif
[MetaColor(MetaColor.DragonRose)]
[MetaGroup(EcsConsts.FRAMEWORK_NAME)]
/// <summary>Pool for IEcsTagComponent components</summary>
public sealed class EcsTagPool<T> : IEcsPoolImplementation<T>, IEcsStructPool<T>, IEnumerable<T> //IEnumerable<T> - IntelliSense hack
where T : struct, IEcsTagComponent
{

View File

@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
//using System.Runtime.Serialization;
namespace DCFApixels.DragonECS
@ -408,7 +407,7 @@ namespace DCFApixels.DragonECS
{
get
{
if(State == EntState.Alive)
if (State == EntState.Alive)
{
World.GetComponentsFor(id, _componentsList);
return _componentsList;