Class BinAttributeBool
Binary encoded attribute for bool values. Each bool is represented by a single bit.
Namespace: AS2.Subroutines.BinStateHelpers
Assembly: .dll
Syntax
public class BinAttributeBool : BinAttribute<bool>
Constructors
| Edit this page View SourceBinAttributeBool(ParticleAttribute<int>, int)
Creates a new attribute wrapper referencing the given state attribute int.
Declaration
public BinAttributeBool(ParticleAttribute<int> attr, int idx)
Parameters
Type | Name | Description |
---|---|---|
ParticleAttribute<int> | attr | The attribute storing the integer that contains this value as a subset of bits. |
int | idx | The bit index at which the encoding of this value starts. |
Methods
| Edit this page View SourceGetCurrentValue()
Returns the latest value.
Declaration
public override bool GetCurrentValue()
Returns
Type | Description |
---|---|
bool | The value decoded from the int's latest value. |
Overrides
| Edit this page View SourceGetValue()
Returns the value from the beginning of the current round.
Declaration
public override bool GetValue()
Returns
Type | Description |
---|---|
bool | The value decoded from the int's snapshot value. |
Overrides
| Edit this page View SourceSetValue(bool)
Writes a new value to the state integer.
Declaration
public override void SetValue(bool value)
Parameters
Type | Name | Description |
---|---|---|
bool | value | The new value to be written. |