SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
Loading...
Searching...
No Matches
sfs3::requests::SpectatorToPlayerRequest Class Reference

Turns the current user from spectator to player in a Game Room. More...

#include <SpectatorToPlayerRequest.h>

Inheritance diagram for sfs3::requests::SpectatorToPlayerRequest:
[legend]

Public Member Functions

 SpectatorToPlayerRequest (std::shared_ptr< entities::Room > targetRoom=nullptr)

Detailed Description

Turns the current user from spectator to player in a Game Room.

If the operation is successful, all the users in the target Room are notified with the SPECTATOR_TO_PLAYER event. The operation could fail if no player slots are available in the Game Room at the time of the request; in this case the SPECTATOR_TO_PLAYER_ERROR event is dispatched to the requester's client.

See also
PlayerToSpectatorRequest

Constructor & Destructor Documentation

◆ SpectatorToPlayerRequest()

sfs3::requests::SpectatorToPlayerRequest::SpectatorToPlayerRequest ( std::shared_ptr< entities::Room > targetRoom = nullptr)
inline
Parameters
targetRoomthe Room in which the spectator should be turned to player; if nullptr, the last Room joined by the current user is used

The documentation for this class was generated from the following files:
  • requests/SpectatorToPlayerRequest.h
  • requests/SpectatorToPlayerRequest.cpp