trait Client extends AnyRef
Trait representing a Client
- Alphabetic
- By Inheritance
- Client
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
addPlayerToLobby(player: BasePlayer): Unit
Adds a player to the lobby.
Adds a player to the lobby.
- player
The player to add.
-
abstract
def
bind(actorRef: ActorRef): Unit
Binds this instance with the input ActorRef.
Binds this instance with the input ActorRef.
- actorRef
The ActorRef
-
abstract
def
closeLobby(byUser: Boolean = true): Unit
Closes the lobby.
Closes the lobby.
- byUser
If the lobby have been closed by the user or not.
-
abstract
def
connect(address: String, port: Int): Promise[Boolean]
Connects to a server.
Connects to a server.
- address
The server address.
- port
The port address.
- returns
Promise that completes with true if the connection has been successfully established; otherwise false.
-
abstract
def
enterLobby(username: String, lobbyContext: LobbyContext): Promise[Boolean]
Requests to enter the lobby.
Requests to enter the lobby.
- username
The username of the player.
- lobbyContext
The lobby context.
- returns
Promise that completes with true if the client have successfully entered the lobby; otherwise false.
-
abstract
def
getLobbyPlayers: Seq[BasePlayer]
Gets the lobby players.
Gets the lobby players.
- returns
All players in the lobby.
-
abstract
def
getUUID: String
Gets the uuid of the cell entity that represents this client.
Gets the uuid of the cell entity that represents this client.
- returns
The uuid
-
abstract
def
initGame(levelContext: MultiPlayerLevelContext): Unit
Initializes the game.
Initializes the game.
- levelContext
The level context.
-
abstract
def
kill(): Unit
Kills this instance.
-
abstract
def
leaveGame(): Unit
Leaves the game.
-
abstract
def
leaveLobby(): Unit
Requests to leave the lobby.
-
abstract
def
notifyRedraw(entities: Seq[DrawableEntity]): Unit
Notifies the client to redraw.
Notifies the client to redraw.
- entities
The entities to draw.
-
abstract
def
removePlayerFromLobby(username: String): Unit
Removes a player from the lobby.
Removes a player from the lobby.
- username
The username of the player.
-
abstract
def
signalPlayerInput(event: MouseEventWrapper): Unit
Forwards player into to the server.
Forwards player into to the server.
- event
The event.
-
abstract
def
startGame(uuid: String, levelInfo: LevelInfo, mapShape: MapShape): Unit
Starts the game.
Starts the game.
- uuid
The entity uuid assigned to this client by the server.
- levelInfo
The level info.
- mapShape
The shape of the level.
-
abstract
def
stopGame(victorious: Boolean): Unit
Stops the game.
Stops the game.
- victorious
If this client won or not.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- implicit val timeout: Timeout
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- implicit val who: String