mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-05-24 04:58:00 -05:00
- Rewrote networking based on tutorials from MLAPI Demo Project and Dapper Dino - Created Lobby UI based on the turorial from Dapper Dino - Linked Existing UI into using the new networking - Modified Lobby Settings to only allow 3 players - Added Field for players to enter their player name
22 lines
556 B
C#
22 lines
556 B
C#
using MLAPI.Serialization;
|
|
|
|
public struct LobbyPlayerState : INetworkSerializable {
|
|
public ulong ClientId;
|
|
public string PlayerName;
|
|
public bool IsReady;
|
|
|
|
public LobbyPlayerState(ulong clientId, string playerName, bool isReady)
|
|
{
|
|
ClientId = clientId;
|
|
PlayerName = playerName;
|
|
IsReady = isReady;
|
|
}
|
|
|
|
public void NetworkSerialize(NetworkSerializer serializer)
|
|
{
|
|
serializer.Serialize(ref ClientId);
|
|
serializer.Serialize(ref PlayerName);
|
|
serializer.Serialize(ref IsReady);
|
|
}
|
|
}
|