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
valuesbool[]
SmallBoolArray(int)
public SmallBoolArray(int values)
Parameters
valuesint
SmallBoolArray(int[])
public SmallBoolArray(int[] values)
Parameters
valuesint[]
Fields
OnAllSides
public const int OnAllSides = 63
Field Value
Properties
All
public bool All { get; set; }
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
iint
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
otherintAn 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
oobject
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
Fill(bool)
public void Fill(bool b)
Parameters
bbool
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
faceBlockFacing
Returns
Opposite(int)
public bool Opposite(int i)
Parameters
iint
Returns
ToIntArray(int)
public int[] ToIntArray(int size)
Parameters
sizeint
Returns
- int[]
Value()
public int Value()
Returns
Operators
operator ==(SmallBoolArray, int)
public static bool operator ==(SmallBoolArray left, int right)
Parameters
leftSmallBoolArrayrightint
Returns
implicit operator int(SmallBoolArray)
public static implicit operator int(SmallBoolArray a)
Parameters
Returns
operator !=(SmallBoolArray, int)
public static bool operator !=(SmallBoolArray left, int right)
Parameters
leftSmallBoolArrayrightint