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

Public Member Functions

 Number (int current, int min, int max, int step, int interval)
 Creates an instance of . More...
 
void Incrementer ()
 Makes the instance an incremental number. This means the current value will increase at every interval by the value of step. More...
 
void Decrementer ()
 Makes the instance a decremental number. This means the current value will decrease at every interval by the value of step. 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 increase and/or decrease. More...
 
int GetCurrentValue ()
 Returns the curerrent value of the instance. More...
 
bool IsIncrementer ()
 Returns true if the instance is incremental type. More...
 
bool IsDecrementer ()
 Returns true if the instance is decremental type. More...
 

Detailed Description

Represents a numeric value that increase and decrease over time.

Constructor & Destructor Documentation

◆ Number()

Diarkis.Modules.Timed.Number.Number ( int  current,
int  min,
int  max,
int  step,
int  interval 
)
inline

Creates an instance of .

Parameters
currentThe initial value of the instance.
minMinimum allowed value of the instance.
maximumMaximum allowed value of the instance.
stepValue used to increase and/or decrease the current value by at every interval.
intervalInterval in seconds to increase and/or decrease the current value.

Member Function Documentation

◆ Decrementer()

void Diarkis.Modules.Timed.Number.Decrementer ( )
inline

Makes the instance a decremental number. This means the current value will decrease at every interval by the value of step.

◆ GetCurrentValue()

int Diarkis.Modules.Timed.Number.GetCurrentValue ( )
inline

Returns the curerrent value of the instance.

◆ Incrementer()

void Diarkis.Modules.Timed.Number.Incrementer ( )
inline

Makes the instance an incremental number. This means the current value will increase at every interval by the value of step.

◆ IsDecrementer()

bool Diarkis.Modules.Timed.Number.IsDecrementer ( )
inline

Returns true if the instance is decremental type.

◆ IsIncrementer()

bool Diarkis.Modules.Timed.Number.IsIncrementer ( )
inline

Returns true if the instance is incremental type.

◆ Start()

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

Starts the instance's time to increase and/or decrease.

◆ Update()

void Diarkis.Modules.Timed.Number.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 value with this value.
updatedReplace the internal last updated timestamp with this value.

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