remove BitMask

This commit is contained in:
Mikhail 2023-03-30 06:19:24 +08:00
parent fea46221e0
commit 1890943d5a
2 changed files with 0 additions and 49 deletions

View File

@ -1,38 +0,0 @@
using System;
namespace DCFApixels.DragonECS
{
public class BitMask
{
private int[] data;
public int Length { get; private set; }
public BitMask(int length)
{
Length = length;
data = new int[(length + 31) / 32];
}
public void Resize(int newLength)
{
Length = newLength;
Array.Resize(ref data, (newLength + 31) / 32);
}
public void Set1(int index)
{
data[index / 32] |= 1 << (index % 32);
}
public void Set0(int index)
{
data[index / 32] &= ~(1 << (index % 32));
}
public bool Get(int index)
{
return (data[index / 32] & (1 << (index % 32))) != 0;
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 88bc1ea51d98c0843a48314fbe00ad9e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: