public bool ReceiveMapInfo(S2C.MapInfo mapInfo) { Debug.Log("[Client] received map info"); Load(mapInfo); return true; }
public void Load(S2C.MapInfo mapInfo) { MapData mapData = (MapData)Resources.Load("Maps/" + mapInfo.m_mapName); Load(mapData); LoadDirtyTiles(mapInfo.m_dirtyTiles); LoadDirtyBuildings(mapInfo.m_dirtyBuildings); CompleteLoadMap(); }
public void ReceivePlayerName(S2C.BroadcastPlayerName pck) { PlayerManager.Inst.UpdatePlayerName(pck.playerID, pck.name); if (isServer) { TryEnterCharacter(pck.playerID); } }
public void ReceivePlayerTeam(S2C.BroadcastPlayerTeam pck) { UpdatePlayerTeam(pck.playerID, pck.team); if (isServer) { ServerPlayer player = PlayerManager.Inst.Get(pck.playerID); if (player == null) { TryEnterCharacter(pck.playerID); } } }
public void PreparePlayer(S2C.PlayerNotReady pck) { switch (pck.error) { case PlayerSettingError.NAME: nameSelector.Open(); break; case PlayerSettingError.TEAM: teamSelector.Open(); break; } }