Class ParticleAttribute_Direction
ParticleAttribute<T> subclass representing direction values.
Inheritance
Namespace: AS2.Sim
Assembly: .dll
Syntax
public class ParticleAttribute_Direction : ParticleAttributeWithHistory<Direction>, IParticleAttribute, IReplayHistory
Constructors
| Edit this page View SourceParticleAttribute_Direction(Particle, string, Direction)
Declaration
public ParticleAttribute_Direction(Particle particle, string name, Direction value = Direction.NONE)
Parameters
Type | Name | Description |
---|---|---|
Particle | particle | |
string | name | |
Direction | value |
Methods
| Edit this page View SourceEquals(ParticleAttribute<Direction>)
Indicates whether the current object is equal to another object of the same type.
Declaration
public override bool Equals(ParticleAttribute<Direction> other)
Parameters
Type | Name | Description |
---|---|---|
ParticleAttribute<Direction> | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Overrides
| Edit this page View SourceGetCurrentValue()
Returns the latest value of this attribute.
The return value changes based on value assignments made within this activation. Use GetValue() to get the attribute's value at the beginning of the current round.
Declaration
public override Direction GetCurrentValue()
Returns
Type | Description |
---|---|
Direction | The latest value of this attribute. |
Overrides
| Edit this page View SourceGetValue()
Returns the attribute's value from the snapshot taken at the beginning of the current round.
The return value is not changed by assigning new values to this attribute! To get the latest assigned value, use GetCurrentValue().
Declaration
public override Direction GetValue()
Returns
Type | Description |
---|---|
Direction | The attribute value at the beginning of the current round. |
Overrides
| Edit this page View SourceSetRandomValue()
Sets the attribute's value to a random value if the attribute type allows this.
Declaration
public bool SetRandomValue()
Returns
Type | Description |
---|---|
bool |
|
SetValue(Direction)
Assigns the given value to this attribute.
Note that this value will only be visible to other particles in the next round.
Declaration
public override void SetValue(Direction value)
Parameters
Type | Name | Description |
---|---|---|
Direction | value | The new value assigned to this attribute. |
Overrides
| Edit this page View SourceToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |
Overrides
ToString_AttributeValue()
String representation of the attribute's current value.
Declaration
public string ToString_AttributeValue()
Returns
Type | Description |
---|---|
string | A string containing the attribute's current value. |
UpdateAttributeValue(string)
Updates the attribute's value to the one represented by the given string.
Declaration
public bool UpdateAttributeValue(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | String representation of the new value. |
Returns
Type | Description |
---|---|
bool |
|