mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-11-13 17:15:54 +08:00
add namespace for runners core
This commit is contained in:
parent
54b88a3a98
commit
ed30d58614
@ -1,6 +1,7 @@
|
||||
namespace DCFApixels.DragonECS
|
||||
{
|
||||
using DCFApixels.DragonECS.RunnersCore;
|
||||
|
||||
namespace DCFApixels.DragonECS
|
||||
{
|
||||
public interface IEcsPreInitSystem : IEcsSystem
|
||||
{
|
||||
public void PreInit(EcsPipeline pipeline);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using DCFApixels.DragonECS.Internal;
|
||||
using DCFApixels.DragonECS.RunnersCore;
|
||||
using System.Linq;
|
||||
|
||||
namespace DCFApixels.DragonECS
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
namespace DCFApixels.DragonECS
|
||||
using DCFApixels.DragonECS.RunnersCore;
|
||||
|
||||
namespace DCFApixels.DragonECS
|
||||
{
|
||||
public interface IEcsComponentAdd : IEcsSystem
|
||||
{
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using DCFApixels.DragonECS.RunnersCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using DCFApixels.DragonECS.RunnersCore;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
@ -22,6 +23,9 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
|
||||
public interface IEcsSystem { }
|
||||
|
||||
namespace RunnersCore
|
||||
{
|
||||
public interface IEcsRunner
|
||||
{
|
||||
public EcsPipeline Source { get; }
|
||||
@ -124,11 +128,6 @@ namespace DCFApixels.DragonECS
|
||||
EcsRunner<TInterface>.Register(runnerType);
|
||||
}
|
||||
}
|
||||
|
||||
public static class EcsRunner
|
||||
{
|
||||
public static void Destroy(object runner) => ((IEcsRunner)runner).Destroy();
|
||||
}
|
||||
public abstract class EcsRunner<TInterface> : IEcsSystem, IEcsRunner
|
||||
where TInterface : IEcsSystem
|
||||
{
|
||||
@ -240,7 +239,7 @@ namespace DCFApixels.DragonECS
|
||||
|
||||
internal void Rebuild()
|
||||
{
|
||||
if(_isHasFilter)
|
||||
if (_isHasFilter)
|
||||
Set(_source, FilterSystems(_source.AllSystems), _isHasFilter, _filter);
|
||||
else
|
||||
Set(_source, FilterSystems(_source.AllSystems, _filter), _isHasFilter, _filter);
|
||||
@ -260,8 +259,12 @@ namespace DCFApixels.DragonECS
|
||||
protected virtual void OnSetup() { }
|
||||
protected virtual void OnDestroy() { }
|
||||
}
|
||||
|
||||
}
|
||||
#region Extensions
|
||||
public static class EcsRunner
|
||||
{
|
||||
public static void Destroy(IEcsSystem runner) => ((IEcsRunner)runner).Destroy();
|
||||
}
|
||||
public static class IEcsSystemExtensions
|
||||
{
|
||||
public static bool IsRunner(this IEcsSystem self)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user