Wait

Namespace: Bang.StateMachines
Assembly: Bang.dll

public class Wait : IEquatable<T>

A message fired to communicate the current state of the state machine.

Implements: IEquatable<T>

⭐ Constructors

protected Wait(Wait original)

Parameters
original Wait

⭐ Properties

Component

public Type Component;

Used for WaitKind.Message.

Returns
Type

EqualityContract

protected virtual Type EqualityContract { get; }

Returns
Type

Kind

public readonly WaitKind Kind;

When should the state machine be called again.

Returns
WaitKind

NextFrame

public static Wait NextFrame { get; }

Wait until the next frame.

Returns
Wait

Routine

public IEnumerator<T> Routine;

Used for WaitKind.Routine.

Returns
IEnumerator<T>

Stop

public readonly static Wait Stop;

No longer execute the state machine.

Returns
Wait

Target

public Entity Target;

Used for WaitKind.Message when waiting on another entity that is not the owner of the state machine.

Returns
Entity

Value

public T? Value;

Integer value, if kind is WaitKind.Frames.

Returns
T?

⭐ Methods

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters
builder StringBuilder

Returns
bool

Equals(Wait)

public virtual bool Equals(Wait other)

Parameters
other Wait

Returns
bool

Equals(Object)

public virtual bool Equals(Object obj)

Parameters
obj Object

Returns
bool

GetHashCode()

public virtual int GetHashCode()

Returns
int

ToString()

public virtual string ToString()

Returns
string

ForFrames(int)

public Wait ForFrames(int frames)

Wait until have occurred.

Parameters
frames int

Returns
Wait

ForMessage()

public Wait ForMessage()

Wait until message of type is fired.

Returns
Wait

ForMessage(Entity)

public Wait ForMessage(Entity target)

Wait until message of type is fired from .

Parameters
target Entity

Returns
Wait

ForMs(int)

public Wait ForMs(int ms)

Wait for .

Parameters
ms int

Returns
Wait

ForRoutine(IEnumerator)

public Wait ForRoutine(IEnumerator<T> routine)

Wait until finishes.

Parameters
routine IEnumerator<T>

Returns
Wait

ForSeconds(float)

public Wait ForSeconds(float seconds)

Wait for .

Parameters
seconds float

Returns
Wait