Show / Hide Table of Contents

# Class SyncStateMachine<T>

##### Inheritance

object
InternalBaseClass
SyncableField
SyncStateMachine<T>

##### Inherited Members

SyncableField.IsClient
SyncableField.IsServer
SyncableField.BeforeReadRPC()
SyncableField.AfterReadRPC()
SyncableField.OnRollback()
SyncableField.RegisterRPC(ref SyncableRPCRegistrator)
InternalBaseClass.ExecuteRPC(in RemoteCall)
InternalBaseClass.ExecuteRPC<T>(in RemoteCall<T>, T)
InternalBaseClass.ExecuteRPC<T>(in RemoteCallSpan<T>, ReadOnlySpan<T>)
InternalBaseClass.ExecuteRPC<T>(in RemoteCallSerializable<T>, T)
InternalBaseClass.OnSyncRequested()

###### Namespace: LiteEntitySystem.Extensions

###### Assembly: LiteEntitySystem.dll

##### Syntax

    public class SyncStateMachine<T> : SyncableField where T : unmanaged, Enum

##### Type Parameters

Name | Description
--- | ---
T |

### Constructors

#### SyncStateMachine()

##### Declaration

    public SyncStateMachine()

### Properties

#### CurrentState

##### Declaration

    public T CurrentState { get; }

##### Property Value

Type | Description
--- | ---
T |

### Methods

#### Add(T, StateCalls)

##### Declaration

    public SyncStateMachine<T> Add(T stateName, StateCalls stateCalls)

##### Parameters

Type | Name | Description
--- | --- | ---
T | stateName |
StateCalls | stateCalls |

##### Returns

Type | Description
--- | ---
SyncStateMachine<T> |

#### ChangeState(T)

##### Declaration

    public void ChangeState(T state)

##### Parameters

Type | Name | Description
--- | --- | ---
T | state |

#### SetInitialState(T)

##### Declaration

    public void SetInitialState(T state)

##### Parameters

Type | Name | Description
--- | --- | ---
T | state |

#### Update(float)

##### Declaration

    public void Update(float dt)

##### Parameters

Type | Name | Description
--- | --- | ---
float | dt |