Photon Server API
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
Photon.Hive.HiveGame Class Reference

A Room that supports the following requests:

More...

Inheritance diagram for Photon.Hive.HiveGame:
Photon.Hive.Room Photon.Hive.HiveHostGame Photon.Hive.Tests.TestGame Photon.LoadBalancing.GameServer.Game Photon.LoadBalancing.UnitTests.UnifiedServer.OfflineExtra.TestGame

Public Member Functions

 HiveGame (string gameName, RoomCacheBase roomCache, IGameStateFactory gameStateFactory=null, int maxEmptyRoomTTL=0, int lastTouchLimitMilliseconds=0, int lastTouchCheckIntervalMilliseconds=0, ExtendedPoolFiber executionFiber=null)
 Initializes a new instance of the HiveGame class. More...
 
override string ToString ()
 
bool CheckBeforeJoinThisIsNewCreatedRoom (JoinGameRequest request)
 
bool CheckAfterJoinThisIsNewCreatedRoom (bool isNewActor)
 
virtual void RemoveInactiveActor (Actor actor)
 
void PublishEventDiconnected (Actor actor, int?newMasterClientId)
 
void OnActorRemoved (Actor actor)
 
void OnActorDeactivated (Actor actor)
 
- Public Member Functions inherited from Photon.Hive.Room
 Room (string name, RoomCacheBase roomCache=null, IGameStateFactory gameStateFactory=null, int maxEmptyRoomTTL=0, ExtendedPoolFiber executionFiber=null)
 Initializes a new instance of the Room class without a room name. More...
 
override string ToString ()
 
virtual bool BeforeRemoveFromCache ()
 Called by the RoomCacheBase if the room is about to be removed from the cache. More...
 
void EnqueueMessage (IMessage message)
 Enqueues an IMessage to the end of the execution queue. More...
 
void EnqueueOperation (HivePeer peer, OperationRequest operationRequest, SendParameters sendParameters)
 Enqueues an OperationRequest to the end of the execution queue. More...
 
IDisposable ScheduleMessage (IMessage message, long timeMs)
 Schedules a message to be processed after a specified time. More...
 
void Dispose ()
 Releases resources used by this instance. More...
 
virtual void OnClose ()
 
void Release ()
 

Protected Member Functions

virtual void CleanupActor (Actor actor)
 
virtual void DeactivateActor (Actor actor)
 
bool CreateGame (HivePeer peer, JoinGameRequest request, SendParameters sendParameters)
 
override void ExecuteOperation (HivePeer peer, OperationRequest operationRequest, SendParameters sendParameters)
 Called for each operation in the execution queue. Every Room has a queue of incoming operations to execute. Per game ExecuteOperation is never executed multi-threaded, thus all code executed here has thread safe access to all instance members. More...
 
Actor GetActorByPeer (HivePeer peer)
 Gets the actor for a HivePeer. More...
 
Hashtable GetLobbyGameProperties (Hashtable source)
 
Hashtable GetLobbyGameProperties (Hashtable source, HashSet< object > list)
 
virtual void HandleChangeGroupsOperation (HivePeer peer, ChangeGroups changeGroupsRequest, SendParameters sendParameters)
 
bool UpdateCacheSlice (HivePeer peer, byte op, int?sliceIndex, ref string message)
 
virtual void HandleCreateGameOperation (HivePeer peer, SendParameters sendParameters, CreateGameRequest createGameRequest)
 
virtual void HandleDebugGameOperation (HivePeer peer, DebugGameRequest request, SendParameters sendParameters)
 
virtual void HandleGetPropertiesOperation (HivePeer peer, GetPropertiesRequest getPropertiesRequest, SendParameters sendParameters)
 Handles the GetPropertiesRequest operation: Sends the properties with the OperationResponse. More...
 
virtual void HandleJoinGameOperation (HivePeer peer, SendParameters sendParameters, JoinGameRequest joinGameRequest)
 Handles the JoinGameRequest: Joins a peer to a room and calls PublishJoinEvent. Before a JoinOperation reaches this point (inside a room), the HivePeer made sure that it is removed from the previous Room (if there was any). More...
 
virtual void HandleLeaveOperation (HivePeer peer, SendParameters sendParameters, LeaveRequest leaveOperation)
 Handles the LeaveRequest and calls RemovePeerFromGame. More...
 
virtual void HandleRaiseEventOperation (HivePeer peer, RaiseEventRequest raiseEventRequest, SendParameters sendParameters)
 Handles the RaiseEventRequest: Sends a CustomEvent to actors in the room. More...
 
virtual void HandleRemovePeerMessage (HivePeer peer, int reason, string details)
 
virtual void HandleSetPropertiesOperation (HivePeer peer, SetPropertiesRequest request, SendParameters sendParameters)
 Handles the SetPropertiesRequest and sends event PropertiesChangedEvent to all Actors in the room. More...
 
bool Join (HivePeer peer, JoinGameRequest joinRequest, SendParameters sendParameters)
 
virtual void JoinFailureHandler (byte leaveReason, HivePeer peer, JoinGameRequest request)
 
bool JoinApplyGameStateChanges (HivePeer peer, JoinGameRequest joinRequest, SendParameters sendParameters, out Actor actor)
 
virtual void SendErrorResponse (HivePeer peer, byte opCode, ErrorCode errorCode, string msg, SendParameters sendParameters, Dictionary< byte, object > errorData=null)
 
virtual bool AddExpectedUsers (JoinGameRequest joinRequest)
 
bool JoinSendResponseAndEvents (HivePeer peer, JoinGameRequest joinRequest, SendParameters sendParameters, int actorNr, ProcessJoinParams prms)
 
virtual OperationResponse GetUserJoinResponse (JoinGameRequest joinRequest, int actorNr, ProcessJoinParams prms)
 
void LeaveOperationHandler (HivePeer peer, SendParameters sendParameters, LeaveRequest request)
 
void LogOperation (HivePeer peer, OperationRequest operationRequest)
 
override void ProcessMessage (IMessage message)
 Processes a game message. Messages are used for internal communication. Per default only message RemovePeerFromGame is handled, a message that is sent when a player leaves a game due to disconnect or due to a subsequent join to a different game. More...
 
void PublishEventCache (HivePeer litePeer, JoinGameRequest joinRequest)
 Sends all cached events to a peer. More...
 
virtual void PublishJoinEvent (HivePeer peer, JoinGameRequest joinRequest)
 Sends a JoinEvent to all Actors. More...
 
virtual void PublishLeaveEvent (Actor actor, int?newMasterClientId)
 Sends a LeaveEvent to all Actors. More...
 
bool RaiseEventOperationHandler (HivePeer peer, RaiseEventRequest raiseEventRequest, SendParameters sendParameters, Actor actor)
 
virtual int RemovePeerFromGame (HivePeer peer, bool isCommingBack)
 Removes a peer from the game. This method is called if a client sends a LeaveRequest or disconnects. More...
 
bool SetPropertiesRequestHandler (HivePeer peer, SetPropertiesRequest request, SendParameters sendParameters)
 
void RevertProperties (IDictionary oldPropertyValues, SetPropertiesRequest request)
 
Hashtable GetOldPropertyValues (SetPropertiesRequest request)
 
bool ValidateAndFillSetPropertiesRequest (HivePeer peer, SetPropertiesRequest request, out string errorMsg)
 
virtual void OnGamePropertiesChanged (SetPropertiesRequest request)
 
void PublishResultsAndSetGameProperties (bool propertiesUpdateResult, string errorMessage, SetPropertiesRequest request, HivePeer peer, SendParameters sendParameters)
 
virtual bool SetNewPropertyValues (SetPropertiesRequest request, out string errorMessage)
 
virtual bool TryAddPeerToGame (HivePeer peer, int actorNr, out Actor actor, out bool isNewActor, out ErrorCode errorcode, out string reason, JoinGameRequest joinRequest)
 Tries to add a HivePeer to this game instance. More...
 
bool UpdateEventCache (Actor actor, RaiseEventRequest raiseEventRequest, out string msg)
 Helper method of HandleRaiseEventOperation. Stores an event for new actors. More...
 
bool UpdateEventCache (Actor actor, byte eventCode, object data, byte cacheOp, out string msg)
 
bool UpdateEventCache (Actor actor, byte evCode, object data, CacheOperation cacheOp, ref string msg)
 
bool ValidateGame (HivePeer peer, JoinGameRequest joinGameRequest, SendParameters sendParameters)
 
- Protected Member Functions inherited from Photon.Hive.Room
 Room (string name, ExtendedPoolFiber executionFiber, RoomCacheBase roomCache, IGameStateFactory gameStateFactory=null, int maxEmptyRoomTTL=0)
 Initializes a new instance of the Room class. More...
 
virtual void Dispose (bool dispose)
 Releases unmanaged and - optionally - managed resources More...
 
void PublishEvent (HiveEventBase e, Actor actor, SendParameters sendParameters)
 Publishes an event to a single actor on a specified channel. More...
 
void PublishEvent (HiveEventBase e, IEnumerable< Actor > actorList, SendParameters sendParameters)
 Publishes an event to a list of actors on a specified channel. More...
 
void PublishEvent (EventData e, IEnumerable< Actor > actorList, SendParameters sendParameters)
 Publishes an event to a list of actors on a specified channel. More...
 
void ScheduleRoomRemoval (int roomLiveTime)
 Schedules the removal of the room instance from the cache. The room will be removed after the specified time if there are no room references left. More...
 
void TryRemoveRoomFromCache ()
 Removes the room instance from the cache if there are no references to the instance left. More...
 

Protected Attributes

readonly LogQueue LogQueue
 
readonly int LastTouchLimitMilliseconds
 
readonly int LastTouchCheckIntervalMilliseconds
 
IHiveGameAppCounters gameAppCounters = NullHiveGameAppCounters.Instance
 
- Protected Attributes inherited from Photon.Hive.Room
readonly RoomCacheBase roomCache
 
readonly IGameStateFactory gameStateFactory
 
string RemoveRoomPathString
 
GameState roomState
 

Properties

IHiveGameAppCounters GameAppCounters [get, set]
 
int MasterClientId [get]
 
virtual bool IsPersistent [get]
 
IEnumerable< ActorInactiveActors [get]
 
IEnumerable< ActorActors [get]
 
bool PublishUserId [get, set]
 
bool IsOpen [get, set]
 
bool IsVisible [get, set]
 
string LobbyId [get, set]
 
bool DeleteCacheOnLeave [get, set]
 Gets or sets a value indicating whether cached events are automaticly deleted for actors which are leaving a room. More...
 
HashSet< object > LobbyProperties [get, set]
 Contains the keys of the game properties hashtable which should be listet in the lobby. More...
 
AppLobbyType LobbyType [get, set]
 
byte MaxPlayers [get, set]
 
int PlayerTTL [get, set]
 Player live time More...
 
bool SuppressRoomEvents [get, set]
 Gets or sets a value indicating if common room events (Join, Leave) will suppressed. More...
 
RoomEventCacheManager EventCache [get]
 
EventCacheDictionary ActorEventCache [get]
 Contains Caching.EventCaches for all actors. More...
 
GroupManager GroupManager [get]
 
ActorsManager ActorsManager [get]
 
GameState RoomState [get]
 
bool CheckUserOnJoin [get, set]
 
- Properties inherited from Photon.Hive.Room
RemoveState RemoveRoomPath [get, set]
 
ExtendedPoolFiber ExecutionFiber [get]
 Gets a PoolFiber instance used to synchronize access to this instance. More...
 
bool IsDisposed [get]
 Gets a value indicating whether IsDisposed. More...
 
string Name [get]
 Gets the name (id) of the room. More...
 
int EmptyRoomLiveTime [get, protected set]
 Gets or sets a value indicating how long the room instance will be keeped alive in the room cache after all peers have left the room. More...
 
int MaxEmptyRoomTTL [get]
 
IDisposable RemoveTimer [get, set]
 Timer for removing room More...
 
PropertyBag< object > Properties [get]
 Gets a PropertyBag instance used to store custom room properties. More...
 

Additional Inherited Members

- Protected Types inherited from Photon.Hive.Room
enum  RemoveState {
  RemoveState.Alive, RemoveState.TryRemoveRoomFromCacheCalled, RemoveState.RoomRemoved, RemoveState.TryRemoveRoomFromCacheCalledRoomNotRemoved,
  RemoveState.ProcessCloseGameCalled, RemoveState.TriggerPluginOnCloseCalled, RemoveState.AliveGotNewPlayer, RemoveState.ScheduleTriggerPluginOnCloseCalled,
  RemoveState.ProcessBeforeCloseGameCalled, RemoveState.ProcessBeforeCloseGameCalledEmptyRoomLiveTimeLECalled, RemoveState.BeforeRemoveFromCacheCalled, RemoveState.BeforeRemoveFromCacheActionCalled,
  RemoveState.GameDisposeCalled
}
 

Detailed Description

A Room that supports the following requests:

Constructor & Destructor Documentation

Photon.Hive.HiveGame.HiveGame ( string  gameName,
RoomCacheBase  roomCache,
IGameStateFactory  gameStateFactory = null,
int  maxEmptyRoomTTL = 0,
int  lastTouchLimitMilliseconds = 0,
int  lastTouchCheckIntervalMilliseconds = 0,
ExtendedPoolFiber  executionFiber = null 
)
inline

Initializes a new instance of the HiveGame class.

Parameters
gameNameThe name of the game.
roomCacheThe RoomCacheBase instance to which the room belongs.
gameStateFactoryCustom factory for GameState. if null is set, default factory is used
maxEmptyRoomTTLA value indicating how long the room instance will be kept alive in the room cache after all peers have left the room.
lastTouchLimitMillisecondsSpecifies to maximum value for a peers GetLastTouch in milliseconds before a peer will removed from the room. If set to zero no check will bew performed.
lastTouchCheckIntervalMillisecondsSpecifies the in interval in milliseconds to check peer in the room for the GetLastTouched value. If set to zero no check will be performed.
executionFiber

Member Function Documentation

virtual bool Photon.Hive.HiveGame.AddExpectedUsers ( JoinGameRequest  joinRequest)
inlineprotectedvirtual
bool Photon.Hive.HiveGame.CheckAfterJoinThisIsNewCreatedRoom ( bool  isNewActor)
inline
bool Photon.Hive.HiveGame.CheckBeforeJoinThisIsNewCreatedRoom ( JoinGameRequest  request)
inline
virtual void Photon.Hive.HiveGame.CleanupActor ( Actor  actor)
inlineprotectedvirtual
bool Photon.Hive.HiveGame.CreateGame ( HivePeer  peer,
JoinGameRequest  request,
SendParameters  sendParameters 
)
inlineprotected
virtual void Photon.Hive.HiveGame.DeactivateActor ( Actor  actor)
inlineprotectedvirtual
override void Photon.Hive.HiveGame.ExecuteOperation ( HivePeer  peer,
OperationRequest  operationRequest,
SendParameters  sendParameters 
)
inlineprotectedvirtual

Called for each operation in the execution queue. Every Room has a queue of incoming operations to execute. Per game ExecuteOperation is never executed multi-threaded, thus all code executed here has thread safe access to all instance members.

Parameters
peerThe peer.
operationRequestThe operation request to execute.
sendParametersThe send Parameters.

Reimplemented from Photon.Hive.Room.

Actor Photon.Hive.HiveGame.GetActorByPeer ( HivePeer  peer)
inlineprotected

Gets the actor for a HivePeer.

Parameters
peerThe peer.
Returns
The actor for the peer or null if no actor for the peer exists (this should not happen).
Hashtable Photon.Hive.HiveGame.GetLobbyGameProperties ( Hashtable  source)
inlineprotected
Hashtable Photon.Hive.HiveGame.GetLobbyGameProperties ( Hashtable  source,
HashSet< object >  list 
)
inlineprotected
Hashtable Photon.Hive.HiveGame.GetOldPropertyValues ( SetPropertiesRequest  request)
inlineprotected
virtual OperationResponse Photon.Hive.HiveGame.GetUserJoinResponse ( JoinGameRequest  joinRequest,
int  actorNr,
ProcessJoinParams  prms 
)
inlineprotectedvirtual

Reimplemented in Photon.Hive.HiveHostGame.

virtual void Photon.Hive.HiveGame.HandleChangeGroupsOperation ( HivePeer  peer,
ChangeGroups  changeGroupsRequest,
SendParameters  sendParameters 
)
inlineprotectedvirtual
virtual void Photon.Hive.HiveGame.HandleCreateGameOperation ( HivePeer  peer,
SendParameters  sendParameters,
CreateGameRequest  createGameRequest 
)
inlineprotectedvirtual

Reimplemented in Photon.Hive.HiveHostGame.

virtual void Photon.Hive.HiveGame.HandleDebugGameOperation ( HivePeer  peer,
DebugGameRequest  request,
SendParameters  sendParameters 
)
inlineprotectedvirtual
virtual void Photon.Hive.HiveGame.HandleGetPropertiesOperation ( HivePeer  peer,
GetPropertiesRequest  getPropertiesRequest,
SendParameters  sendParameters 
)
inlineprotectedvirtual

Handles the GetPropertiesRequest operation: Sends the properties with the OperationResponse.

Parameters
peerThe peer.
getPropertiesRequestThe operation to handle.
sendParametersThe send Parameters.
virtual void Photon.Hive.HiveGame.HandleJoinGameOperation ( HivePeer  peer,
SendParameters  sendParameters,
JoinGameRequest  joinGameRequest 
)
inlineprotectedvirtual

Handles the JoinGameRequest: Joins a peer to a room and calls PublishJoinEvent. Before a JoinOperation reaches this point (inside a room), the HivePeer made sure that it is removed from the previous Room (if there was any).

Parameters
peerThe peer.
sendParametersThe send Parameters.
joinGameRequestThe join Game Request.

Reimplemented in Photon.Hive.HiveHostGame.

virtual void Photon.Hive.HiveGame.HandleLeaveOperation ( HivePeer  peer,
SendParameters  sendParameters,
LeaveRequest  leaveOperation 
)
inlineprotectedvirtual

Handles the LeaveRequest and calls RemovePeerFromGame.

Parameters
peerThe peer.
sendParametersThe send Parameters.
leaveOperationThe operation.

Reimplemented in Photon.Hive.HiveHostGame.

virtual void Photon.Hive.HiveGame.HandleRaiseEventOperation ( HivePeer  peer,
RaiseEventRequest  raiseEventRequest,
SendParameters  sendParameters 
)
inlineprotectedvirtual

Handles the RaiseEventRequest: Sends a CustomEvent to actors in the room.

Parameters
peerThe peer.
raiseEventRequestThe operation
sendParametersThe send Parameters.

Reimplemented in Photon.Hive.HiveHostGame.

virtual void Photon.Hive.HiveGame.HandleRemovePeerMessage ( HivePeer  peer,
int  reason,
string  details 
)
inlineprotectedvirtual

Reimplemented in Photon.Hive.HiveHostGame.

virtual void Photon.Hive.HiveGame.HandleSetPropertiesOperation ( HivePeer  peer,
SetPropertiesRequest  request,
SendParameters  sendParameters 
)
inlineprotectedvirtual

Handles the SetPropertiesRequest and sends event PropertiesChangedEvent to all Actors in the room.

Parameters
peerThe peer.
requestThe SetPropertiesRequest operation to handle.
sendParametersThe send Parameters.

Reimplemented in Photon.Hive.HiveHostGame.

bool Photon.Hive.HiveGame.Join ( HivePeer  peer,
JoinGameRequest  joinRequest,
SendParameters  sendParameters 
)
inlineprotected
bool Photon.Hive.HiveGame.JoinApplyGameStateChanges ( HivePeer  peer,
JoinGameRequest  joinRequest,
SendParameters  sendParameters,
out Actor  actor 
)
inlineprotected
virtual void Photon.Hive.HiveGame.JoinFailureHandler ( byte  leaveReason,
HivePeer  peer,
JoinGameRequest  request 
)
inlineprotectedvirtual
bool Photon.Hive.HiveGame.JoinSendResponseAndEvents ( HivePeer  peer,
JoinGameRequest  joinRequest,
SendParameters  sendParameters,
int  actorNr,
ProcessJoinParams  prms 
)
inlineprotected
void Photon.Hive.HiveGame.LeaveOperationHandler ( HivePeer  peer,
SendParameters  sendParameters,
LeaveRequest  request 
)
inlineprotected
void Photon.Hive.HiveGame.LogOperation ( HivePeer  peer,
OperationRequest  operationRequest 
)
inlineprotected
void Photon.Hive.HiveGame.OnActorDeactivated ( Actor  actor)
inline
void Photon.Hive.HiveGame.OnActorRemoved ( Actor  actor)
inline
virtual void Photon.Hive.HiveGame.OnGamePropertiesChanged ( SetPropertiesRequest  request)
inlineprotectedvirtual
override void Photon.Hive.HiveGame.ProcessMessage ( IMessage  message)
inlineprotectedvirtual

Processes a game message. Messages are used for internal communication. Per default only message RemovePeerFromGame is handled, a message that is sent when a player leaves a game due to disconnect or due to a subsequent join to a different game.

Parameters
messageMessage to process.

Reimplemented from Photon.Hive.Room.

void Photon.Hive.HiveGame.PublishEventCache ( HivePeer  litePeer,
JoinGameRequest  joinRequest 
)
inlineprotected

Sends all cached events to a peer.

Parameters
litePeerThe lite peer that receives the events.
joinRequest
void Photon.Hive.HiveGame.PublishEventDiconnected ( Actor  actor,
int?  newMasterClientId 
)
inline
virtual void Photon.Hive.HiveGame.PublishJoinEvent ( HivePeer  peer,
JoinGameRequest  joinRequest 
)
inlineprotectedvirtual

Sends a JoinEvent to all Actors.

Parameters
peerThe peer.
joinRequestThe join request.
virtual void Photon.Hive.HiveGame.PublishLeaveEvent ( Actor  actor,
int?  newMasterClientId 
)
inlineprotectedvirtual

Sends a LeaveEvent to all Actors.

Parameters
actorThe actor which sents the event.
newMasterClientId
void Photon.Hive.HiveGame.PublishResultsAndSetGameProperties ( bool  propertiesUpdateResult,
string  errorMessage,
SetPropertiesRequest  request,
HivePeer  peer,
SendParameters  sendParameters 
)
inlineprotected
bool Photon.Hive.HiveGame.RaiseEventOperationHandler ( HivePeer  peer,
RaiseEventRequest  raiseEventRequest,
SendParameters  sendParameters,
Actor  actor 
)
inlineprotected
virtual void Photon.Hive.HiveGame.RemoveInactiveActor ( Actor  actor)
inlinevirtual

Reimplemented in Photon.Hive.HiveHostGame.

virtual int Photon.Hive.HiveGame.RemovePeerFromGame ( HivePeer  peer,
bool  isCommingBack 
)
inlineprotectedvirtual

Removes a peer from the game. This method is called if a client sends a LeaveRequest or disconnects.

Parameters
peerThe HivePeer to remove.
isCommingBackwhether we expect peer will come back or not
Returns
The actor number of the removed actor. If the specified peer does not exists -1 will be returned.
void Photon.Hive.HiveGame.RevertProperties ( IDictionary  oldPropertyValues,
SetPropertiesRequest  request 
)
inlineprotected
virtual void Photon.Hive.HiveGame.SendErrorResponse ( HivePeer  peer,
byte  opCode,
ErrorCode  errorCode,
string  msg,
SendParameters  sendParameters,
Dictionary< byte, object >  errorData = null 
)
inlineprotectedvirtual
virtual bool Photon.Hive.HiveGame.SetNewPropertyValues ( SetPropertiesRequest  request,
out string  errorMessage 
)
inlineprotectedvirtual
bool Photon.Hive.HiveGame.SetPropertiesRequestHandler ( HivePeer  peer,
SetPropertiesRequest  request,
SendParameters  sendParameters 
)
inlineprotected
override string Photon.Hive.HiveGame.ToString ( )
inline
virtual bool Photon.Hive.HiveGame.TryAddPeerToGame ( HivePeer  peer,
int  actorNr,
out Actor  actor,
out bool  isNewActor,
out ErrorCode  errorcode,
out string  reason,
JoinGameRequest  joinRequest 
)
inlineprotectedvirtual

Tries to add a HivePeer to this game instance.

Parameters
peerThe peer to add.
actorNrThe actor Nr.
actorWhen this method returns this out param contains the Actor associated with the peer .
errorcodereturns error code if we fail to add actor
reasonreason why player can not be added
isNewActorreturns true if actor is new
joinRequestjoin request which was sent by client
Returns
Returns true if no actor exists for the specified peer and a new actor for the peer has been successfully added. The actor parameter is set to the newly created Actor instance. Returns false if an actor for the specified peer already exists. The actor parameter is set to the existing Actor for the specified peer.
bool Photon.Hive.HiveGame.UpdateCacheSlice ( HivePeer  peer,
byte  op,
int?  sliceIndex,
ref string  message 
)
inlineprotected
bool Photon.Hive.HiveGame.UpdateEventCache ( Actor  actor,
RaiseEventRequest  raiseEventRequest,
out string  msg 
)
inlineprotected

Helper method of HandleRaiseEventOperation. Stores an event for new actors.

Parameters
actorThe actor.
raiseEventRequestThe raise event request.
msgContains an error message if the method returns false.
Returns
True if RaiseEventRequest.Cache is valid.
bool Photon.Hive.HiveGame.UpdateEventCache ( Actor  actor,
byte  eventCode,
object  data,
byte  cacheOp,
out string  msg 
)
inlineprotected
bool Photon.Hive.HiveGame.UpdateEventCache ( Actor  actor,
byte  evCode,
object  data,
CacheOperation  cacheOp,
ref string  msg 
)
inlineprotected
bool Photon.Hive.HiveGame.ValidateAndFillSetPropertiesRequest ( HivePeer  peer,
SetPropertiesRequest  request,
out string  errorMsg 
)
inlineprotected
bool Photon.Hive.HiveGame.ValidateGame ( HivePeer  peer,
JoinGameRequest  joinGameRequest,
SendParameters  sendParameters 
)
inlineprotected

Member Data Documentation

IHiveGameAppCounters Photon.Hive.HiveGame.gameAppCounters = NullHiveGameAppCounters.Instance
protected
readonly int Photon.Hive.HiveGame.LastTouchCheckIntervalMilliseconds
protected
readonly int Photon.Hive.HiveGame.LastTouchLimitMilliseconds
protected
readonly LogQueue Photon.Hive.HiveGame.LogQueue
protected

Property Documentation

EventCacheDictionary Photon.Hive.HiveGame.ActorEventCache
get

Contains Caching.EventCaches for all actors.

IEnumerable<Actor> Photon.Hive.HiveGame.Actors
get
ActorsManager Photon.Hive.HiveGame.ActorsManager
get
bool Photon.Hive.HiveGame.CheckUserOnJoin
getset
bool Photon.Hive.HiveGame.DeleteCacheOnLeave
getset

Gets or sets a value indicating whether cached events are automaticly deleted for actors which are leaving a room.

RoomEventCacheManager Photon.Hive.HiveGame.EventCache
get
IHiveGameAppCounters Photon.Hive.HiveGame.GameAppCounters
getset
GroupManager Photon.Hive.HiveGame.GroupManager
get
IEnumerable<Actor> Photon.Hive.HiveGame.InactiveActors
get
bool Photon.Hive.HiveGame.IsOpen
getset
virtual bool Photon.Hive.HiveGame.IsPersistent
get
bool Photon.Hive.HiveGame.IsVisible
getset
string Photon.Hive.HiveGame.LobbyId
getset
HashSet<object> Photon.Hive.HiveGame.LobbyProperties
getset

Contains the keys of the game properties hashtable which should be listet in the lobby.

AppLobbyType Photon.Hive.HiveGame.LobbyType
getset
int Photon.Hive.HiveGame.MasterClientId
get
byte Photon.Hive.HiveGame.MaxPlayers
getset
int Photon.Hive.HiveGame.PlayerTTL
getset

Player live time

bool Photon.Hive.HiveGame.PublishUserId
getset
GameState Photon.Hive.HiveGame.RoomState
get
bool Photon.Hive.HiveGame.SuppressRoomEvents
getset

Gets or sets a value indicating if common room events (Join, Leave) will suppressed.