示例#1
0
    public void Init()
    {
        networkManager = BombermanNetworkManager.Instance;

        scores     = new List <int> ();
        scoreTexts = new List <Text> ();

        for (int i = 0; i < networkManager.connectedPlayers.Count; i++)
        {
            Text score = Instantiate(playerScorePrefab).GetComponent <Text> ();
            score.transform.SetParent(scoreBoard.transform);

            scoreTexts.Add(score);

            score.text = networkManager.connectedPlayers [i].username + ": " + GameManager.PLAYER_LIVES.ToString();
            scores.Add(0);
        }

        hasInitialized = true;
    }
 public BmRootController(ContentManager contentManager)
     : base(contentManager)
 {
     networkManager = new NetworkManager();
 }