Photon Unity Networking 2: TurnExtensions Class Reference

Photon Unity Networking 2

Static Public Member Functions

static void SetTurn (this Room room, int turn, bool setStartTime=false)
 Sets the turn. More...
 
static int GetTurn (this RoomInfo room)
 Gets the current turn from a RoomInfo More...
 
static int GetTurnStart (this RoomInfo room)
 Returns the start time when the turn began. This can be used to calculate how long it's going on. More...
 
static int GetFinishedTurn (this Player player)
 gets the player's finished turn (from the ROOM properties) More...
 
static void SetFinishedTurn (this Player player, int turn)
 Sets the player's finished turn (in the ROOM properties) More...
 

Static Public Attributes

static readonly string TurnPropKey = "Turn"
 currently ongoing turn number More...
 
static readonly string TurnStartPropKey = "TStart"
 start (server) time for currently ongoing turn (used to calculate end) More...
 
static readonly string FinishedTurnPropKey = "FToA"
 Finished Turn of Actor (followed by number) More...
 

Member Function Documentation

static int GetFinishedTurn ( this Player  player)
static

gets the player's finished turn (from the ROOM properties)

Returns
The finished turn index
Parameters
playerPlayer reference
static int GetTurn ( this RoomInfo  room)
static

Gets the current turn from a RoomInfo

Returns
The turn index
Parameters
roomRoomInfo reference
static int GetTurnStart ( this RoomInfo  room)
static

Returns the start time when the turn began. This can be used to calculate how long it's going on.

Returns
The turn start.
Parameters
roomRoom.
static void SetFinishedTurn ( this Player  player,
int  turn 
)
static

Sets the player's finished turn (in the ROOM properties)

Parameters
playerPlayer Reference
turnTurn Index
static void SetTurn ( this Room  room,
int  turn,
bool  setStartTime = false 
)
static

Sets the turn.

Parameters
roomRoom reference
turnTurn index
setStartTimeIf set to true set start time.

Member Data Documentation

readonly string FinishedTurnPropKey = "FToA"
static

Finished Turn of Actor (followed by number)

readonly string TurnPropKey = "Turn"
static

currently ongoing turn number

readonly string TurnStartPropKey = "TStart"
static

start (server) time for currently ongoing turn (used to calculate end)

Online Documentation  -  Dashboard  -  Support Forum Exit Games GmbH