Package sfs3.client.requests
Class SpectatorToPlayerRequest
java.lang.Object
sfs3.client.requests.BaseRequest
sfs3.client.requests.SpectatorToPlayerRequest
- All Implemented Interfaces:
sfs3.client.requests.IClientRequest
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 spectatorToPlayer 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 spectatorToPlayerError event is dispatched to the requester's client.
- See Also:
-
Field Summary
FieldsFields inherited from class sfs3.client.requests.BaseRequest
AddBuddy, AdminMessage, AutoJoin, BanUser, BanUsersFromRoom, BlockBuddy, CallExtension, ChangeRoomCapacity, ChangeRoomName, ChangeRoomPassword, ClusterInviteUsers, ClusterJoinOrCreate, CreateRoom, CreateSFSGame, FindRooms, FindUsers, GameServerConnectionRequired, GenericMessage, GetRoomList, GoOnline, Handshake, InitBuddyList, InvitationReply, InviteUser, JoinRoom, JoinRoomInvite, KEY_ERROR_CODE, KEY_ERROR_PARAMS, KickUser, LeaveRoom, Login, Logout, ManualDisconnection, ModeratorMessage, ObjectMessage, PingPong, PlayerToSpectator, PrivateMessage, PublicMessage, QuickJoinGame, QuickJoinOrCreateRoom, RemoveBuddy, SetBuddyVariables, SetRoomVariables, SetUserPosition, SetUserVariables, sfso, SpectatorToPlayer, SubscribeRoomGroup, targetController, UdpInit, UnsubscribeRoomGroup -
Constructor Summary
ConstructorsConstructorDescriptionSpectatorToPlayerRequest(Room targetRoom) Creates a new SpectatorToPlayerRequest instance. -
Method Summary
Methods inherited from class sfs3.client.requests.BaseRequest
getId, getRequest, getTargetController, getTransportType, setId, setTargetController, setTransportType
-
Field Details
-
KEY_ROOM_ID
- See Also:
- Internal
-
KEY_USER_ID
- See Also:
- Internal
-
KEY_PLAYER_ID
- See Also:
- Internal
-
-
Constructor Details
-
SpectatorToPlayerRequest
Creates a new SpectatorToPlayerRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.- Parameters:
targetRoom- The Room object corresponding to the Room in which the spectator should be turned to player. Ifnull, the last Room joined by the user is used.- See Also:
-
SpectatorToPlayerRequest
public SpectatorToPlayerRequest()- See Also:
-
-
Method Details
-
validate
- Throws:
SFSValidationException- Internal
-
execute
- Internal
-