예제 #1
0
파일: Game.cs 프로젝트: ngaeta/Lunar-Land
        private static void CheckGameStats()
        {
            SpriteLabel labelToDraw = null;

            if (!playerShip.IsVisible)
            {
                canInput    = false;
                labelToDraw = gameOverText;
            }

            else if (playerShip.IsGrounded && GroundManager.InWinnerPoint(playerShip.Position, playerShip.Ray))
            {
                canInput    = false;
                labelToDraw = winnerText;
            }

            if (labelToDraw != null)
            {
                if (timeToDrawLabel <= 0)
                {
                    canInput = false;
                    labelToDraw.Draw();
                    window.Blit();
                    isPlaying = false;
                    System.Threading.Thread.Sleep(3500);
                }
                else
                {
                    timeToDrawLabel -= GfxTools.Win.deltaTime;
                }
            }
        }