Diarkis C# Client SDK
Public Member Functions | List of all members
Diarkis.Modules.Timed.State Class Reference

Public Member Functions

 State (int[] states, int interval)
 Creates an instance of State. More...
 
void Circular ()
 Makes the instance circular. More...
 
void NonCircular ()
 Makes the instance non-circular. More...
 
void Forward ()
 Moves the state forward by one step regardless of the time. More...
 
void Backward ()
 Moves the state backward by one step regardless of the time. More...
 
void Update (int current, int updated)
 Updates the current value and update time. This should be used to synchronize with the server. More...
 
void Start ()
 Starts the instance's time to change the state. More...
 
int GetCurrentState ()
 Returns the current state. More...
 

Detailed Description

Represents a numerical state tht changes over time. The change can be circular or non-circular.

Constructor & Destructor Documentation

◆ State()

Diarkis.Modules.Timed.State.State ( int[]  states,
int  interval 
)
inline

Creates an instance of State.

Parameters
statesList of numberic states.
Parameters
intervalInterval in seconds for the state to change.

Member Function Documentation

◆ Backward()

void Diarkis.Modules.Timed.State.Backward ( )
inline

Moves the state backward by one step regardless of the time.

◆ Circular()

void Diarkis.Modules.Timed.State.Circular ( )
inline

Makes the instance circular.

◆ Forward()

void Diarkis.Modules.Timed.State.Forward ( )
inline

Moves the state forward by one step regardless of the time.

◆ GetCurrentState()

int Diarkis.Modules.Timed.State.GetCurrentState ( )
inline

Returns the current state.

◆ NonCircular()

void Diarkis.Modules.Timed.State.NonCircular ( )
inline

Makes the instance non-circular.

◆ Start()

void Diarkis.Modules.Timed.State.Start ( )
inline

Starts the instance's time to change the state.

◆ Update()

void Diarkis.Modules.Timed.State.Update ( int  current,
int  updated 
)
inline

Updates the current value and update time. This should be used to synchronize with the server.

Parameters
currentReplace the current state with this value.
updatedReplace the internal last updated timestamp with this value.

The documentation for this class was generated from the following file: