|
SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
|
Turns the current user from player to spectator in a Game Room. More...
#include <PlayerToSpectatorRequest.h>
Public Member Functions | |
| PlayerToSpectatorRequest (std::shared_ptr< entities::Room > targetRoom=nullptr) | |
Turns the current user from player to spectator in a Game Room.
If the operation is successful, all the users in the target Room are notified with the PLAYER_TO_SPECTATOR event. The operation could fail if no spectator slots are available in the Game Room at the time of the request; in this case the PLAYER_TO_SPECTATOR_ERROR event is dispatched to the requester's client.
|
inline |
| targetRoom | the Room in which the player should be turned to spectator; if nullptr, the last Room joined by the current user is used |