From 1890943d5aa9e84a0e049b47e6038ed1505bb6aa Mon Sep 17 00:00:00 2001 From: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Thu, 30 Mar 2023 06:19:24 +0800 Subject: [PATCH] remove BitMask --- src/Utils/BitMask.cs | 38 -------------------------------------- src/Utils/BitMask.cs.meta | 11 ----------- 2 files changed, 49 deletions(-) delete mode 100644 src/Utils/BitMask.cs delete mode 100644 src/Utils/BitMask.cs.meta diff --git a/src/Utils/BitMask.cs b/src/Utils/BitMask.cs deleted file mode 100644 index 6ee6662..0000000 --- a/src/Utils/BitMask.cs +++ /dev/null @@ -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; - } - } -} \ No newline at end of file diff --git a/src/Utils/BitMask.cs.meta b/src/Utils/BitMask.cs.meta deleted file mode 100644 index d44f22e..0000000 --- a/src/Utils/BitMask.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 88bc1ea51d98c0843a48314fbe00ad9e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: