Ejemplo n.º 1
0
    /**
     * 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);
    }
Ejemplo n.º 2
0
 public RankInfo(int rank, PlayerRankInfo SerRI)
 {
     Rank           = rank;
     ServerRankInfo = SerRI;
 }
Ejemplo n.º 3
0
 public void SetPlayerRankInfo(PlayerRankInfo targetPlayerRankInfo)
 {
     playerRankInfo = targetPlayerRankInfo;
     updateInfo();
 }