Exemple #1
0
 public ScoreLabel(GameWrapper i_Game, PlayerShip i_Player)
     : base(i_Game)
 {
     m_PlayerIndex = 0;
     m_Player = i_Player;
     m_Player.ScoreChanged += player_ScoreChanged;
     m_Label = new CalibriLabel(i_Game);
 }
Exemple #2
0
        public void AddPlayer(PlayerShip i_Player, Color? i_Color)
        {
            ScoreLabel newScoreLabel = new ScoreLabel(Game as GameWrapper, i_Player);
            newScoreLabel.Index = m_ScoreLabels.Count + 1;
            newScoreLabel.Label.Position = new Vector2(Position.X, Position.Y + (m_ScoreLabels.Count * k_Margin));

            if (i_Color != null)
            {
                newScoreLabel.Color = i_Color.Value;
            }

            m_ScoreLabels.Add(newScoreLabel);
        }
 public void AddPlayer(PlayerShip i_Player)
 {
     m_Players.Add(i_Player);
 }
Exemple #4
0
 private void player_ScoreChanged(PlayerShip i_Player)
 {
     this.Score = i_Player.Score;
 }