// Only supposed to be called from ServerLobby to set info for connections public void SaveGameInfo(List <PersistentPlayerInfo> playerList) { persistencePlayerInfo = new List <PersistentPlayerInfo>(); for (int i = 0; i < playerList.Count; ++i) { PersistentPlayerInfo info = new PersistentPlayerInfo(); info.name = playerList[i].name; info.playerID = playerList[i].playerID; info.playerType = playerList[i].playerType; info.team = playerList[i].team; persistencePlayerInfo.Add(info); } }
public void Init(ClientConnectionsComponent connHolder, PersistentPlayerInfo playerInfo) { connectionsComponent = connHolder; clientGameSend = GetComponent <ClientGameSend>(); m_PlayerInfo = playerInfo; if (m_PlayerInfo.playerType == LobbyUtils.PLAYER_TYPE.SHOOTER) { clientGameSend.SendDataWhenReady((byte)GAME_CLIENT_REQUESTS.CREATE_ENTITY_WITH_OWNERSHIP); clientGameSend.SendDataWhenReady((byte)CREATE_ENTITY_TYPES.FPS_PLAYER); } else { Instantiate(Match3PlayerObj); } }
public PersistentPlayerInfo Clone() { PersistentPlayerInfo other = new PersistentPlayerInfo(); other.team = team; other.isReady = isReady; if (name != null) { other.name = System.String.Copy(name); } else { other.name = null; } other.playerType = playerType; other.playerID = playerID; return(other); }
public void SetDeltaToZero() { previousState = Clone(); }
public PersistentPlayerInfo() { previousState = null; }
public void SavePlayerInfo(PersistentPlayerInfo playerinfo) { m_PlayerInfo = playerinfo; }