mirror of
https://github.com/DCFApixels/DragonECS-Graphs.git
synced 2025-09-17 19:24:36 +08:00
add EcsGraphWorld
This commit is contained in:
parent
5a32c9dadc
commit
4714fbbab5
8
src/Builtin.meta
Normal file
8
src/Builtin.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e836c2f70983f9a4ba441dc849489aab
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
18
src/Builtin/EcsGraphWorld.cs
Normal file
18
src/Builtin/EcsGraphWorld.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using DCFApixels.DragonECS;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace DCFApixels.Assets.Plugins.DragonECS_Graphs.src.Builtin
|
||||
{
|
||||
/// <summary> EcsWrold for store regular game entities. </summary>
|
||||
[MetaColor(MetaColor.DragonRose)]
|
||||
[MetaGroup(EcsConsts.PACK_GROUP, EcsConsts.WORLDS_GROUP)]
|
||||
[MetaDescription(EcsConsts.AUTHOR, "Inherits EcsWorld without extending its functionality and is used for specific injections. Can be used as argument to EcsWorld.CreateGraph(new " + nameof(EcsGraphWorld) + "()) and to store relation entity.")]
|
||||
[DebuggerTypeProxy(typeof(DebuggerProxy))]
|
||||
[MetaID("ECC4CF479301897718600925B00A7DB4")]
|
||||
public sealed class EcsGraphWorld : EcsWorld, IInjectionUnit
|
||||
{
|
||||
public EcsGraphWorld(EcsWorldConfig config, short worldID = -1) : base(config, worldID) { }
|
||||
public EcsGraphWorld(IConfigContainer configs = null, short worldID = -1) : base(configs, worldID) { }
|
||||
void IInjectionUnit.InitInjectionNode(InjectionGraph nodes) { nodes.AddNode(this); }
|
||||
}
|
||||
}
|
11
src/Builtin/EcsGraphWorld.cs.meta
Normal file
11
src/Builtin/EcsGraphWorld.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 18c16441483c9c841b388ac7fcae7057
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -11,32 +11,6 @@ namespace DCFApixels.DragonECS
|
||||
entities.GetQueryCache(out JoinToSubGraphExecutor executor, out EmptyAspect _);
|
||||
return executor.Execute(mode);
|
||||
}
|
||||
|
||||
//public static EcsSubGraph JoinToSubGraph<TCollection>(this TCollection entities, EcsSubGraphMode mode = EcsSubGraphMode.StartToEnd)
|
||||
// where TCollection : IEntityStorage
|
||||
//{
|
||||
// if (ReferenceEquals(entities, entities.World))
|
||||
// {
|
||||
// entities.World.GetQueryCache(out JoinToSubGraphExecutor executor, out EmptyAspect _);
|
||||
// return executor.Execute(mode);
|
||||
// }
|
||||
// return entities.ToSpan().JoinToSubGraph(out EmptyAspect _, mode);
|
||||
//}
|
||||
|
||||
//public static EcsSubGraph JoinToSubGraph(this EcsReadonlyGroup group, EcsSubGraphMode mode = EcsSubGraphMode.StartToEnd)
|
||||
//{
|
||||
// return group.ToSpan().JoinToSubGraph(mode);
|
||||
//}
|
||||
//public static EcsSubGraph JoinToSubGraph(this EcsSpan span, EcsSubGraphMode mode = EcsSubGraphMode.StartToEnd)
|
||||
//{
|
||||
// EcsWorld world = span.World;
|
||||
// if (world.IsEnableReleaseDelEntBuffer)
|
||||
// {
|
||||
// world.ReleaseDelEntityBufferAll();
|
||||
// }
|
||||
// world.GetQueryCache(out EcsJoinToSubGraphExecutor executor, out EmptyAspect _);
|
||||
// return executor.ExecuteFor(span, mode);
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region JoinToGraph Mask
|
||||
|
Loading…
Reference in New Issue
Block a user