mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
move EcsMaskBit to EcsAspect.cs
This commit is contained in:
parent
4c236a11f3
commit
b07256f020
@ -216,6 +216,26 @@ namespace DCFApixels.DragonECS
|
||||
#endregion
|
||||
|
||||
#region Mask
|
||||
public readonly struct EcsMaskBit
|
||||
{
|
||||
public readonly int chankIndex;
|
||||
public readonly int mask;
|
||||
public EcsMaskBit(int chankIndex, int mask)
|
||||
{
|
||||
this.chankIndex = chankIndex;
|
||||
this.mask = mask;
|
||||
}
|
||||
public static EcsMaskBit FromPoolID(int id)
|
||||
{
|
||||
return new EcsMaskBit(id / 32, 1 << (id % 32));
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"bit({chankIndex}, {mask})";
|
||||
}
|
||||
}
|
||||
|
||||
[DebuggerTypeProxy(typeof(DebuggerProxy))]
|
||||
public sealed class EcsMask
|
||||
{
|
||||
|
@ -1,22 +0,0 @@
|
||||
namespace DCFApixels.DragonECS
|
||||
{
|
||||
public readonly struct EcsMaskBit
|
||||
{
|
||||
public readonly int chankIndex;
|
||||
public readonly int mask;
|
||||
public EcsMaskBit(int chankIndex, int mask)
|
||||
{
|
||||
this.chankIndex = chankIndex;
|
||||
this.mask = mask;
|
||||
}
|
||||
public static EcsMaskBit FromPoolID(int id)
|
||||
{
|
||||
return new EcsMaskBit(id / 32, 1 << (id % 32));
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"bit({chankIndex}, {mask})";
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user