Esempio n. 1
0
        static public void UpdateAllScore()
        {
            ScoreManager pMan = ScoreManager.PrivGetInstance();

            Debug.Assert(pMan != null);

            Font pTestMessage = FontManager.Find(Font.Name.Player1_Score);

            Debug.Assert(pTestMessage != null);
            pTestMessage.UpdateMessage(pMan.Player1_Score);

            pTestMessage = FontManager.Find(Font.Name.Player2_Score);
            Debug.Assert(pTestMessage != null);
            pTestMessage.UpdateMessage(pMan.Player2_Score);

            pTestMessage = FontManager.Find(Font.Name.High_Score);
            Debug.Assert(pTestMessage != null);
            pTestMessage.UpdateMessage(pMan.High_Score);

            pTestMessage = FontManager.Find(Font.Name.Player1_Lives);
            Debug.Assert(pTestMessage != null);
            pTestMessage.UpdateMessage("Lives " + GameScene.Get1PlayerLive());

            pTestMessage = FontManager.Find(Font.Name.Player2_Lives);
            Debug.Assert(pTestMessage != null);
            pTestMessage.UpdateMessage("Lives " + GameScene.Get2PlayerLives());
        }
Esempio n. 2
0
        static public void InitializePlayer1Score()
        {
            ScoreManager pMan = ScoreManager.PrivGetInstance();

            Debug.Assert(pMan != null);

            pMan.Player1_Score = 0;
        }
Esempio n. 3
0
        static public int GetPlayer2Score()
        {
            ScoreManager pMan = ScoreManager.PrivGetInstance();

            Debug.Assert(pMan != null);

            return(pMan.Player2_Score);
        }
Esempio n. 4
0
        static public int GetHighScore()
        {
            ScoreManager pMan = ScoreManager.PrivGetInstance();

            Debug.Assert(pMan != null);

            return(pMan.High_Score);
        }
Esempio n. 5
0
        static public void AddScoreToPlayer2(int score)
        {
            ScoreManager pMan = ScoreManager.PrivGetInstance();

            Debug.Assert(pMan != null);

            pMan.Player2_Score += score;
            pMan.CheckHighScore();
        }