public class StateManager extends Object
Constructor and Description |
---|
StateManager(GameClient gameClient)
Constructs a new StateManager
|
Modifier and Type | Method and Description |
---|---|
long |
getTimeAdjustment()
Returns the most recently calculated amount of time, in milliseconds, to adjust cooldowns by to account for
network latency and differences in system time between the host running this game client and the Interactive
service.
|
void |
onConnectionClose(ConnectionClosedEvent event)
Shuts down the scheduled future for time differences, and clears all locally cached information.
|
void |
onConnectionEstablished(ConnectionEstablishedEvent event)
Upon successful connection to Mixer Interactive, requests initial state information for the Interactive session and
sets up a scheduled future to maintain the time difference between the locally running integration and the connected
Mixer Interactive host.
|
public StateManager(GameClient gameClient)
gameClient
- The game client associated with this StateManagerpublic void onConnectionEstablished(ConnectionEstablishedEvent event)
event
- Connection open eventpublic void onConnectionClose(ConnectionClosedEvent event)
event
- Connection close eventpublic long getTimeAdjustment()
Copyright © 2018. All rights reserved.