Example #1
0
 // PRAGMA MARK - Public Interface
 public void Init(IKotHScoreSource scoreSource)
 {
     foreach (var player in RegisteredPlayers.AllPlayers)
     {
         var view = ObjectPoolManager.Create <IndividualKotHScoreView>(GamePrefabs.Instance.IndividualKotHScorePrefab, parent: layoutContainer_);
         view.Init(player, scoreSource);
     }
 }
Example #2
0
        // PRAGMA MARK - Public Interface
        public void Init(Player player, IKotHScoreSource scoreSource)
        {
            player_ = player;

            Color playerColor = player_.Skin.UIColor;

            bar_.color          = playerColor;
            nicknameText_.Color = playerColor;

            nicknameText_.Text = player.Nickname;

            scoreSource_ = scoreSource;
            scoreSource_.OnAnyScoreChanged += RefreshBar;
            RefreshBar();
        }