Room Events¶
Strix handles the synchronization of objects and their actions in the room server. However, some events apply to player connections or the state of the room. Being notified of these events can be useful, as the player may need to update things like scoreboards or map information.
For most of the actions listed in the previous sections such as creating rooms, deleting rooms, changing room member information, etc., notifications are sent out by the server.
Room events are available on the roomClient
property.
// ex.
StrixNetwork.instance.roomSession.roomClient.RoomDeleted += this.RoomDeleted;
StrixNetwork.instance.roomSession.roomClient.RoomRelayNotified += this.RoomRelayNotified;
The following events are raised when your client receives notifications from the room server. This occurs when others take actions.
Note
There is latency between when the event happens and when the notification is received.
Event |
Description |
Recipients |
---|---|---|
RoomJoinNotified |
Called whenever someone joins the room. |
All members |
RoomLeaveNotified |
Called whenever someone leaves the room. |
All members |
RoomDeleteNotified |
Called whenever the room is deleted. |
All members |
RoomSetNotified |
Called whenever the room owner changes any of the room properties using SetRoom. |
All members |
RoomSetMemberNotified |
Called whenever any of the room members changes its properties using SetRoomMember. |
All members |
RoomDirectRelayNotified |
Called whenever your client gets a direct relay message. |
Only relay message target |
RoomRelayNotified |
Called whenever someone sends a relay message to the room. |
All members |
MatchRoomKickNotified |
Called whenever someone gets kicked out of the room. |
All members |
RoomOwnerChanged |
Called whenever the room’s ownership is transferred to another member.
It occurs only if the room owner migration option is enabled on the server.
|
All members |
The following events are raised when you initiate an action, the action finishes successfully on the server, and you get a response. Some of them are also raised when another player successfully finishes the action.
Event |
Description |
---|---|
RoomCreated |
Called when you create a room using |
RoomSet |
Called when you or another player change the room properties using |
RoomDeleted |
Called when you or another player delete the room using |
RoomJoined |
Called when you join the room using |
RoomLeft |
Called when you leave the room using |
Note
The events explained on this page are C# events, meaning you can use
+=
operator (or add
accessor) to subscribe and
-=
operator (or delete
accessor) to unsubscribe.
They are defined on one of the base classes of SoftGear.Strix.Client.Match.CustomizableMatchRoomClient
class,
and you will usually use them via StrixNetwork.instance.roomSession.roomClient
object
as in the example above.
Event Order¶
See Order of Events for the order events are called in.