Struct SmallBoolArray
- Namespace
- Vintagestory.API.Datastructures
- Assembly
- VintagestoryAPI.dll
Suitable for up to 32 bool values, though normally used only for 6. Offers most of the methods available for a bool[], so can be dropped in to existing code
public struct SmallBoolArray : IEquatable<int>
- Implements
- Inherited Members
- Extension Methods
Constructors
SmallBoolArray(bool[])
public SmallBoolArray(bool[] values)
Parameters
values
bool[]
SmallBoolArray(int)
public SmallBoolArray(int values)
Parameters
values
int
SmallBoolArray(int[])
public SmallBoolArray(int[] values)
Parameters
values
int[]
Fields
OnAllSides
public const int OnAllSides = 63
Field Value
Properties
All
public bool All { get; }
Property Value
Any
public bool Any { get; }
Property Value
Horizontals
public bool Horizontals { get; }
Property Value
this[int]
public bool this[int i] { get; set; }
Parameters
i
int
Property Value
SidesAndBase
public bool SidesAndBase { get; }
Property Value
Verticals
public bool Verticals { get; }
Property Value
Methods
Equals(int)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(int other)
Parameters
other
intAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object o)
Parameters
o
object
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
Fill(bool)
public void Fill(bool b)
Parameters
b
bool
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
OnSide(BlockFacing)
public bool OnSide(BlockFacing face)
Parameters
face
BlockFacing
Returns
Opposite(int)
public bool Opposite(int i)
Parameters
i
int
Returns
ToIntArray(int)
public int[] ToIntArray(int size)
Parameters
size
int
Returns
- int[]
Value()
public int Value()
Returns
Operators
operator ==(SmallBoolArray, int)
public static bool operator ==(SmallBoolArray left, int right)
Parameters
left
SmallBoolArrayright
int
Returns
operator !=(SmallBoolArray, int)
public static bool operator !=(SmallBoolArray left, int right)
Parameters
left
SmallBoolArrayright
int