Empeld
Empeld plugin documentation.
pluginbase.Objects.Syncable.EncodeContext Class Reference

Context that defines how to encode the data within the syncables system More...

Inheritance diagram for pluginbase.Objects.Syncable.EncodeContext:
pluginbase.Objects.Syncable.BaseContext

Public Member Functions

bool ActiveFrequency (int freq)
 Check whether this context includes the frequency to be sent More...
 
- Public Member Functions inherited from pluginbase.Objects.Syncable.BaseContext
void Increment ()
 Increment reads of a context More...
 
void Fail ()
 Failed a context More...
 
void Reset ()
 Reset this instance to make it reusable More...
 

Public Attributes

readonly WatchableEncodeMode Mode
 Mode in which to encode data More...
 
readonly int ServerTick
 The server tick. More...
 
readonly ushort EncodingId
 Id of the user the packet is being encoded by More...
 
- Public Attributes inherited from pluginbase.Objects.Syncable.BaseContext
readonly SyncableEndpoint Endpoint
 The mode in which to decode content More...
 
readonly IFrameTimeState TimeState
 The time state of this frame More...
 

Properties

bool LowPriority [get]
 Should encode low priority items More...
 
bool StandardPriority [get]
 Should encode high priority items More...
 
- Properties inherited from pluginbase.Objects.Syncable.BaseContext
int ReadCount [get]
 How many reads ocurred in this context More...
 
bool Failed [get]
 Gets a value indicating whether this pluginbase.Objects.Syncable.DecodeContext is failed. More...
 
bool EmptyOrFailed [get]
 Are we empty or a failure? More...
 

Additional Inherited Members

- Protected Member Functions inherited from pluginbase.Objects.Syncable.BaseContext
 BaseContext (SyncableEndpoint endpoint, IFrameTimeState timeState)
 Creates an instance of the context More...
 
- Protected Attributes inherited from pluginbase.Objects.Syncable.BaseContext
const int SIMULATE_FREQUENCY_PER_SECOND = 15
 The default frequency per-second More...
 

Detailed Description

Context that defines how to encode the data within the syncables system

Member Function Documentation

◆ ActiveFrequency()

bool pluginbase.Objects.Syncable.EncodeContext.ActiveFrequency ( int  freq)

Check whether this context includes the frequency to be sent

Returns
The frequency.
Parameters
freqIf set to true freq.
90  {
91  return ServerTick % (SIMULATE_FREQUENCY_PER_SECOND / freq) == 0;
92  }
readonly int ServerTick
The server tick.
Definition: EncodeContext.cs:45
const int SIMULATE_FREQUENCY_PER_SECOND
The default frequency per-second
Definition: BaseContext.cs:14

Member Data Documentation

◆ EncodingId

readonly ushort pluginbase.Objects.Syncable.EncodeContext.EncodingId

Id of the user the packet is being encoded by

◆ Mode

readonly WatchableEncodeMode pluginbase.Objects.Syncable.EncodeContext.Mode

Mode in which to encode data

◆ ServerTick

readonly int pluginbase.Objects.Syncable.EncodeContext.ServerTick

The server tick.

Property Documentation

◆ LowPriority

bool pluginbase.Objects.Syncable.EncodeContext.LowPriority
get

Should encode low priority items

true if low priority; otherwise, false.

◆ StandardPriority

bool pluginbase.Objects.Syncable.EncodeContext.StandardPriority
get

Should encode high priority items

true if standard priority; otherwise, false.


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