Пример #1
0
        /// <summary>
        /// Check for keypresses used to end game
        /// </summary>
        public override void Tick()
        {
            playerMoney = 1000 - playerRoundShotNum - playerBarShotNum - playerCarcassShotNum - playerGrapeShotNum - playerGrappleShotNum - playerHullRepairMats - playerSailRepairMats;
            GM.textM.Draw(FontBank.arcadePixel, "Unspent player resources: " + playerMoney, 50, 100);

            opponentMoney = 1000 - opponentRoundShotNum - opponentBarShotNum - opponentCarcassShotNum - opponentGrapeShotNum - opponentGrappleShotNum - opponentHullRepairMats - opponentSailRepairMats;
            GM.textM.Draw(FontBank.arcadePixel, "Unspent opponent resources: " + opponentMoney, GM.screenSize.Center.X + 50, 100);

            if (GM.inputM.KeyPressed(Keys.Escape))
            {
                BackToTitle("Press 1 to start.");
            }
            if (startButton.PressedLeft())
            {
                if (playerMoney >= 0 && opponentMoney >= 0)
                {
                    StartGame();
                }
            }
        }