mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-17 17:34:36 +08:00
add static EcsAspect.GetMask
This commit is contained in:
parent
a016763824
commit
68118dc581
@ -87,6 +87,10 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
get { return EcsAspect.CurrentBuilder.Opt; }
|
||||
}
|
||||
public static EcsMask.Builder GetMask()
|
||||
{
|
||||
return EcsAspect.CurrentBuilder.GetMask();
|
||||
}
|
||||
}
|
||||
public abstract class EcsAspect : IEcsAspect, ITemplateNode, IComponentMask
|
||||
{
|
||||
@ -130,6 +134,10 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
get { return B.Singleton; }
|
||||
}
|
||||
protected static EcsMask.Builder GetMask()
|
||||
{
|
||||
return B.GetMask();
|
||||
}
|
||||
#endregion
|
||||
|
||||
//Инициализация аспектов проходит в синхронизированном состоянии, поэтому использование _staticMaskCache потоко безопасно.
|
||||
@ -277,6 +285,10 @@ namespace DCFApixels.DragonECS
|
||||
#endregion
|
||||
|
||||
#region Include/Exclude/Optional/Combine/Except
|
||||
public EcsMask.Builder GetMask()
|
||||
{
|
||||
return EcsMask.New(_world);
|
||||
}
|
||||
public Singleton<T> Get<T>() where T : struct
|
||||
{
|
||||
return new Singleton<T>(_world.ID);
|
||||
|
Loading…
Reference in New Issue
Block a user