public async Task <bool> PlayerReady() { var send = new PlayerReadyPacket(); var recv = await conn.SendRecv <PlayerReadyPacket, PlayerReadyPacket>(send); return(true); }
public static async void UserGetStartSignalAndSend(PlayerReadyPacket packet, NetClient client) { WaitForPlayerStart(); var ans = client.CreateMessage(); packet.PackIntoNetMessage(ans); client.SendMessage(ans, NetDeliveryMethod.ReliableOrdered); packet.Recycle(); }
// 방에 접속하면 클라이언트에서 게임씬 로딩을 시작한다 // 로딩이 끝난 다음부터 객체가 의미있도록 만들고싶다 // 게임 로딩이 끝나기전에는 무적으로 만드는게 목적 void HandlePlayerReady(Session session, PlayerReadyPacket p) { var holder = GetPlayerHolder(session); if (holder.Mode == PlayerMode.Player) { var player = holder.Player; room.SpawnPlayer(player); player.Session.SendImmediate(leaderboard.GenerateLeaderboardPacket()); } }
void HandlePlayerReady(PlayerReadyPacket p) { }