Esempio n. 1
0
 /// <summary>
 /// Displays the game-over screen in the case that the player hits the wall
 /// </summary>
 /// <param name="WhichWall">The direction of the wall that the player hit</param>
 public void OnHitWall(Direction WhichWall)
 {
     GameForm.UpdateHighScores();
     GameForm.ToggleTimer();                 // No timer visible on game-over screen
     MessageBox.Show("Hit Wall- GAME OVER"); // Display game-over message
     GameForm.ResetGame();
 }
Esempio n. 2
0
 /// <summary>
 /// Displays the game-over screen in the case that the player hits the wall
 /// </summary>
 /// <param name="WhichWall">The direction of the wall that the player hit</param>
 public void OnHitWall(Direction WhichWall)
 {
     b.Play();
     GameForm.ToggleTimer();                // No timer visible on game-over screen
     MessageBox.Show("Hit Wall- You lost"); // Display game-over message
     GameForm.ResetGame();
 }
Esempio n. 3
0
        // 結束狀況 - 撞牆
        public void OnHitWall(Direction WhichWall) // WhichWall - 撞哪一面牆
        {
            GameForm.ToggleTimer();                // 啟動暫停系統 - 關閉
            MessageBox.Show("撞牆", "GAME OVER");
            GameForm.ResetGame();

            /*
             * XmlDocument doc = new XmlDocument();
             * doc.Load("settings.xml");
             * // 選擇節點
             * XmlNode Money = doc.SelectSingleNode("Settings/Money");
             * // 取得節點 欄位
             * XmlElement MoneyElement = (XmlElement)Money;
             * // 取得節點 內容
             * string MoneyData = MoneyElement.GetAttribute("value");
             * // 取得節點 屬性
             * XmlAttribute MoneyAttribute = MoneyElement.GetAttributeNode("value");
             * // 列出節點內的屬性
             * XmlAttributeCollection Moneyattribute = MoneyElement.Attributes;
             * foreach (XmlAttribute item in Moneyattribute)
             * {
             *  if (item.Value == "0")
             *  {
             *      MessageBox.Show("您未下注,無獎無罰");
             *  } else if (score < item.Value) { //BUG - 變數無法存取
             *      MessageBox.Show("分數比下注少喔");
             *  }
             *
             * }
             */
        }