Esempio n. 1
0
        public ScoreFE(ScoreCounter scoreCounter)
        {
            this.Margin = new Thickness(20);

            //Text block with actual score
            Margin = new Thickness(10);
            TextUpdate(scoreCounter);
            FontSize = 25;


            //subscribing event - we need to know when score is changed
            scoreCounter.ScoreChanged += OnScoreChanged;

            //subscribing event - to know when game over happened
            scoreCounter.FinalScore += OnFinalScore;
        }
Esempio n. 2
0
        public ScoreHistoryFe(ScoreCounter scoreCounter)
        {
            this.Margin = new Thickness(20);

            _sortedScoreList = new SortedList <int, ScoreLine>();

            //Text block with actual score
            _actualScoreText          = new TextBlock();
            _actualScoreText.Margin   = new Thickness(10);
            _actualScoreText.Text     = "Score: " + scoreCounter.Score;
            _actualScoreText.FontSize = 25;
            this.Children.Add(_actualScoreText);


            //subscribing event - we need to know when score is changed
            scoreCounter.ScoreChanged += OnScoreChanged;

            //subscribing event - to know when game over happened
            scoreCounter.FinalScore += OnFinalScore;
        }