/** * Method to spawn a PlayerRankInfo object in the Scroll View with the given player data. */ private void SpawnPlayerRankObj(string playerName, int points, int rank) { GameObject playerRank = Instantiate(playerRankTemplate) as GameObject; PlayerRankInfo playerRankInfo = playerRank.GetComponent <PlayerRankInfo>(); playerRankInfo.SetPlayerName(playerName); playerRankInfo.SetPoints(points); playerRankInfo.SetRank(rank); playerRank.transform.SetParent(playerRankTemplate.transform.parent, false); playerRank.SetActive(true); }
public RankInfo(int rank, PlayerRankInfo SerRI) { Rank = rank; ServerRankInfo = SerRI; }
public void SetPlayerRankInfo(PlayerRankInfo targetPlayerRankInfo) { playerRankInfo = targetPlayerRankInfo; updateInfo(); }