示例#1
0
 public void Draw()
 {
     if (state == PauseMenuState.NURSEIN)
     {
         JellyfishRenderer.DrawJellyfish(nurseX - 300 + 300 * animateTime / 250, nurseY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
     }
     if (state == PauseMenuState.NURSEOUT)
     {
         JellyfishRenderer.DrawJellyfish(nurseX - 300 * animateTime / 250, nurseY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
     }
     if (state == PauseMenuState.READY)
     {
         JellyfishRenderer.DrawJellyfish(nurseX, nurseY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
         JellyfishRenderer.DrawSpeechBubble(speechX, speechY, 100, SpriteEffects.None);
         Game.spriteBatch.DrawString(Game.spriteFont, "Doctor?", new Vector2(speechX - 250, speechY), Color.Black);
         int offSet = 20;
         for (int i = 0; i < optionList.Count(); i++)
         {
             if (i == selectedOption)
             {
                 Game.spriteBatch.DrawString(Game.spriteFont, optionList[i].optionString, new Vector2(speechX - (optionList.Count - 2) * 125 + offSet, speechY + 40), Game.jellyBlue);
             }
             else
             {
                 Game.spriteBatch.DrawString(Game.spriteFont, optionList[i].optionString, new Vector2(speechX - (optionList.Count - 2) * 125 + offSet, speechY + 40), Color.Black);
             }
             offSet += optionList[i].optionString.Length * 10 + 40;
         }
     }
 }
示例#2
0
        public void Draw()
        {
            if (state == SplashScreenState.FADE || state == SplashScreenState.READY)
            {
                Game.spriteBatch.Draw(MainMenu.background, new Rectangle(0, 0, Game.screenSizeX, Game.screenSizeY), Color.White);

                for (int i = 0; i < startPositions.Count; i++)
                {
                    JellyfishRenderer.DrawJellyfish((int)startPositions[i].X, (int)startPositions[i].Y, 100, textures[i], .5f);
                }

                Game.spriteBatch.Draw(MainMenu.header, new Rectangle(headerX, headerY, headerWidth, headerHeight), Color.White);

                JellyfishRenderer.DrawJellyfish(doctorX + 200, doctorY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
                JellyfishRenderer.DrawJellyfish(doctorX, doctorY, 100, JellyfishRenderer.doctorJellyfish, .75f, SpriteEffects.FlipHorizontally);
            }
            if (state == SplashScreenState.SLIDE)
            {
                Game.spriteBatch.Draw(MainMenu.background, new Rectangle(0, 0, Game.screenSizeX, Game.screenSizeY), Color.White);
                Game.spriteBatch.Draw(MainMenu.header, new Rectangle(headerX, headerY, headerWidth, headerHeight), Color.White);

                for (int i = 0; i < startPositions.Count; i++)
                {
                    int startX = (int)startPositions[i].X;
                    int startY = (int)startPositions[i].Y;
                    int endX   = (int)endPositions[i].X;
                    int endY   = (int)endPositions[i].Y;
                    JellyfishRenderer.DrawJellyfish(startX + (endX - startX) * animateTime / maxAnimateTime, startY + (endY - startY) * animateTime / maxAnimateTime, 100, textures[i], .5f);
                }

                JellyfishRenderer.DrawJellyfish(doctorX + 200 + ((doctorEndX - doctorX) * animateTime) / maxAnimateTime, doctorY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
                JellyfishRenderer.DrawJellyfish(doctorX + ((doctorEndX - doctorX) * animateTime) / maxAnimateTime, doctorY, 100, JellyfishRenderer.doctorJellyfish, .75f, SpriteEffects.FlipHorizontally);
            }
            if (state == SplashScreenState.READY)
            {
                Game.spriteBatch.Draw(MainMenu.header, new Rectangle(headerX, headerY, headerWidth, headerHeight), Color.White);
                JellyfishRenderer.DrawJellyfish(doctorX + 200, doctorY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
                JellyfishRenderer.DrawJellyfish(doctorX, doctorY, 100, JellyfishRenderer.doctorJellyfish, .75f, SpriteEffects.FlipHorizontally);
                Game.spriteBatch.DrawString(Game.menuFont, "Press START to begin!", new Vector2(400, 550), Color.White);
            }
            if (state == SplashScreenState.FADE)
            {
                Color fadeColor = new Color();
                fadeColor.A = (Byte)(255 * (maxAnimateTime - animateTime) / maxAnimateTime);
                fadeColor.R = (Byte)(255 * (maxAnimateTime - animateTime) / maxAnimateTime);
                fadeColor.G = (Byte)(255 * (maxAnimateTime - animateTime) / maxAnimateTime);
                fadeColor.B = (Byte)(255 * (maxAnimateTime - animateTime) / maxAnimateTime);
                Game.spriteBatch.Draw(MainMenu.background, new Rectangle(0, 0, Game.screenSizeX, Game.screenSizeY), fadeColor);
            }
            if (state == SplashScreenState.WAIT)
            {
                Game.spriteBatch.Draw(MainMenu.header, new Rectangle(headerX, headerY, headerWidth, headerHeight), Color.White);
                JellyfishRenderer.DrawJellyfish(doctorEndX + 200, doctorY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
                JellyfishRenderer.DrawJellyfish(doctorEndX, doctorY, 100, JellyfishRenderer.doctorJellyfish, .75f, SpriteEffects.FlipHorizontally);
            }
        }
示例#3
0
        public void Draw()
        {
            Game.spriteBatch.Draw(background, new Rectangle(0, 0, Game.screenSizeX, Game.screenSizeY), Color.White);
            Game.spriteBatch.Draw(header, new Rectangle(headerX, headerY, headerWidth, headerHeight), Color.White);

            for (int i = 0; i < optionList.Count; i++)
            {
                if (i == selectedIndex)
                {
                    PuzzleNode p = new PuzzleNode(Game.jellyBlue);
                    p.screenX = optionListX - 25;
                    p.screenY = optionListY + optionHeight / 2 + i * optionGap;
                    if (state == MainMenuState.ANIMATEDOWN)
                    {
                        p.screenY -= (int)(optionGap * (1f - (float)animateTime / (float)250));
                    }
                    if (state == MainMenuState.ANIMATEUP)
                    {
                        p.screenY += (int)(optionGap * (1f - (float)animateTime / (float)250));
                    }

                    p.distance = 50;
                    p.scale    = 1f;
                    OrbRenderer.DrawOrb(p, State.READY, 0f);
                    Game.spriteBatch.DrawString(Game.menuFont, optionList[i].optionText, new Vector2(optionListX, optionListY + i * optionGap), Color.LightGreen);
                }
                else
                {
                    Game.spriteBatch.DrawString(Game.menuFont, optionList[i].optionText, new Vector2(optionListX, optionListY + i * optionGap), Color.White);
                }
            }
            if (state == MainMenuState.DOCTORIN)
            {
                JellyfishRenderer.DrawJellyfish(doctorX + 800 - 600 * animateTime / 250, doctorY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
                JellyfishRenderer.DrawJellyfish(doctorX + 600 - 600 * animateTime / 250, doctorY, 100, JellyfishRenderer.doctorJellyfish, .75f, SpriteEffects.FlipHorizontally);
            }
            else if (state == MainMenuState.DOCTOROUT)
            {
                JellyfishRenderer.DrawJellyfish(doctorX + 200 + 600 * animateTime / 250, doctorY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
                JellyfishRenderer.DrawJellyfish(doctorX + 600 * animateTime / 250, doctorY, 100, JellyfishRenderer.doctorJellyfish, .75f, SpriteEffects.FlipHorizontally);
            }
            else
            {
                JellyfishRenderer.DrawJellyfish(doctorX + 200, doctorY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
                JellyfishRenderer.DrawJellyfish(doctorX, doctorY, 100, JellyfishRenderer.doctorJellyfish, .75f, SpriteEffects.FlipHorizontally);
            }
            if (state == MainMenuState.READY)
            {
                JellyfishRenderer.DrawSpeechBubble2(speechX, speechY, 100, SpriteEffects.FlipHorizontally);
                Game.spriteBatch.DrawString(Game.spriteFont, optionList[selectedIndex].optionString, new Vector2(speechX - 255, speechY + 5), Color.Black);
            }
            Game.spriteBatch.DrawString(Game.spriteFont, "Created by Kevin Costello. Artwork by Rachel K Sreebny", new Vector2(creditsX, creditsY), Color.LightGray, 0, Vector2.Zero, .75f, SpriteEffects.None, 0);
            Game.spriteBatch.DrawString(Game.spriteFont, "Music by Kevin MacLeod", new Vector2(creditsX + 95, creditsY + 22), Color.LightGray, 0, Vector2.Zero, .75f, SpriteEffects.None, 0);
        }
示例#4
0
 public void Draw()
 {
     if (state != TutorialLauncherState.ZOOM)
     {
         JellyfishRenderer.DrawJellyfish(jellyX, jellyY, 100, JellyfishRenderer.yellowJelly, 1f, SpriteEffects.None);
     }
     if (state == TutorialLauncherState.ZOOM)
     {
         JellyfishRenderer.DrawJellyfish(jellyX, jellyY, 100, JellyfishRenderer.yellowJelly, (1f * animateTime) / (1f * maxAnimateTime), SpriteEffects.None);
     }
     if (state == TutorialLauncherState.NURSEIN)
     {
         JellyfishRenderer.DrawJellyfish(nurseX - 300 + 300 * animateTime / 500, nurseY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
     }
     if (state == TutorialLauncherState.DOCTORIN)
     {
         JellyfishRenderer.DrawJellyfish(doctorX + 300 - 300 * animateTime / 500, nurseY, 100, JellyfishRenderer.doctorJellyfish, .75f, SpriteEffects.FlipHorizontally);
     }
     if (state == TutorialLauncherState.DOCTOROUT)
     {
         JellyfishRenderer.DrawJellyfish(doctorX + 300 * animateTime / 500, nurseY, 100, JellyfishRenderer.doctorJellyfish, .75f, SpriteEffects.FlipHorizontally);
     }
     if (state != TutorialLauncherState.ZOOM && state != TutorialLauncherState.NURSEIN)
     {
         JellyfishRenderer.DrawJellyfish(nurseX, nurseY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
     }
     if (state == TutorialLauncherState.DOCTORTEXT)
     {
         JellyfishRenderer.DrawJellyfish(doctorX, doctorY, 100, JellyfishRenderer.doctorJellyfish, .75f, SpriteEffects.FlipHorizontally);
         JellyfishRenderer.DrawSpeechBubble(speechX, speechY, 100, SpriteEffects.FlipHorizontally);
         Game.spriteBatch.DrawString(Game.spriteFont, "Hey there! Jellyfish Surgery is very tricky, but \nNurse Jellyfish will teach you the basics..", new Vector2(speechX - 260, speechY), Color.Black);
         Game.spriteBatch.Draw(HelpOverlay.summary_confirm, new Rectangle(speechX + 255, speechY + 60, 25, 25), Color.Green);
     }
     if (state == TutorialLauncherState.NURSETEXT)
     {
         JellyfishRenderer.DrawSpeechBubble(speechX, speechY, 100, SpriteEffects.None);
         Game.spriteBatch.DrawString(Game.spriteFont, "Welcome! You must be Doctor Jellyfish's \nnew assistant. Look! Here he is now...", new Vector2(speechX - 260, speechY), Color.Black);
         Game.spriteBatch.Draw(HelpOverlay.summary_confirm, new Rectangle(speechX + 255, speechY + 60, 25, 25), Color.Green);
     }
     if (state == TutorialLauncherState.FINALTEXT)
     {
         JellyfishRenderer.DrawSpeechBubble(speechX, speechY, 100, SpriteEffects.None);
         Game.spriteBatch.DrawString(Game.spriteFont, "We can practice on Mister Jellyfish here! \nLet's take a look inside and get started...", new Vector2(speechX - 260, speechY), Color.Black);
         Game.spriteBatch.Draw(HelpOverlay.summary_confirm, new Rectangle(speechX + 255, speechY + 60, 25, 25), Color.Green);
     }
 }
示例#5
0
 public void Draw()
 {
     if (state == SummaryMenuState.NURSEIN)
     {
         JellyfishRenderer.DrawJellyfish(nurseX - 300 + 300 * animateTime / 250, nurseY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
     }
     if (state == SummaryMenuState.NURSEOUT)
     {
         JellyfishRenderer.DrawJellyfish(nurseX - 300 * animateTime / 250, nurseY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
     }
     if (state == SummaryMenuState.READY || state == SummaryMenuState.WAIT)
     {
         JellyfishRenderer.DrawJellyfish(nurseX, nurseY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
         if (Game.metaState != MetaState.GamePlay)
         {
             JellyfishRenderer.DrawSpeechBubble(speechX, speechY, 100, SpriteEffects.None);
             Game.spriteBatch.DrawString(Game.spriteFont, text, new Vector2(speechX - 260, speechY - 5), Color.Black);
             int offSet = 20;
             for (int i = 0; i < optionList.Count(); i++)
             {
                 if (i == selectedOption)
                 {
                     Game.spriteBatch.DrawString(Game.spriteFont, optionList[i].optionString, new Vector2(speechX - (optionList.Count - 2) * 130 + offSet, speechY + 55), Game.jellyBlue);
                 }
                 else
                 {
                     Game.spriteBatch.DrawString(Game.spriteFont, optionList[i].optionString, new Vector2(speechX - (optionList.Count - 2) * 130 + offSet, speechY + 55), Color.Black);
                 }
                 offSet += optionList[i].optionString.Length * 10 + 40;
             }
             if (optionList.Count() == 1)
             {
                 Game.spriteBatch.Draw(HelpOverlay.summary_confirm, new Rectangle(speechX + 255, speechY + 60, 25, 25), Color.Green);
             }
         }
     }
 }
示例#6
0
        public void Draw()
        {
            Game.spriteBatch.Draw(background, new Rectangle(0, 0, Game.screenSizeX, Game.screenSizeY), Color.White);
            Game.spriteBatch.Draw(header, new Rectangle(headerX, headerY, headerWidth, headerHeight), Color.White);
            JellyfishRenderer.DrawJellyfish(doctorX + 200, doctorY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
            JellyfishRenderer.DrawJellyfish(doctorX, doctorY, 100, JellyfishRenderer.doctorJellyfish, .75f, SpriteEffects.FlipHorizontally);

            for (int i = 0; i < optionList.Count; i++)
            {
                if (i == selectedIndex)
                {
                    PuzzleNode p = new PuzzleNode(Game.jellyBlue);
                    p.screenX = optionListX - 25;
                    p.screenY = optionListY + optionHeight / 2 + i * optionGap;
                    if (state == MenuState.AnimateDown)
                    {
                        p.screenY -= (int)(optionGap * (1f - (float)animationTime / (float)maxAnimationTime));
                    }
                    if (state == MenuState.AnimateUp)
                    {
                        p.screenY += (int)(optionGap * (1f - (float)animationTime / (float)maxAnimationTime));
                    }

                    p.distance = 50;
                    p.scale    = 1f;
                    OrbRenderer.DrawOrb(p, State.READY, 0f);
                    Game.spriteBatch.DrawString(Game.menuFont, optionList[i].optionText, new Vector2(optionListX, optionListY + i * optionGap), Color.LightGreen);
                }
                else
                {
                    Game.spriteBatch.DrawString(Game.menuFont, optionList[i].optionText, new Vector2(optionListX, optionListY + i * optionGap), Color.White);
                }
                if (optionList[i].type == MenuType.SoundToggle)
                {
                    if (Game.gameSettings.soundEffectsEnabled)
                    {
                        Game.spriteBatch.DrawString(Game.menuFont, "On", new Vector2(optionListX + 300, optionListY + i * optionGap), Color.White);
                    }
                    else
                    {
                        Game.spriteBatch.DrawString(Game.menuFont, "Off", new Vector2(optionListX + 300, optionListY + i * optionGap), Color.White);
                    }
                }
                if (optionList[i].type == MenuType.HelpToggle)
                {
                    if (Game.gameSettings.displayControls)
                    {
                        Game.spriteBatch.DrawString(Game.menuFont, "On", new Vector2(optionListX + 300, optionListY + i * optionGap), Color.White);
                    }
                    else
                    {
                        Game.spriteBatch.DrawString(Game.menuFont, "Off", new Vector2(optionListX + 300, optionListY + i * optionGap), Color.White);
                    }
                }
                if (optionList[i].type == MenuType.FullScreenToggle)
                {
                    if (Game.gameSettings.fullScreen)
                    {
                        Game.spriteBatch.DrawString(Game.menuFont, "On", new Vector2(optionListX + 300, optionListY + i * optionGap), Color.White);
                    }
                    else
                    {
                        Game.spriteBatch.DrawString(Game.menuFont, "Off", new Vector2(optionListX + 300, optionListY + i * optionGap), Color.White);
                    }
                }
                if (optionList[i].type == MenuType.WideScreenToggle)
                {
                    if (Game.gameSettings.wideScreen)
                    {
                        Game.spriteBatch.DrawString(Game.menuFont, "On", new Vector2(optionListX + 300, optionListY + i * optionGap), Color.White);
                    }
                    else
                    {
                        Game.spriteBatch.DrawString(Game.menuFont, "Off", new Vector2(optionListX + 300, optionListY + i * optionGap), Color.White);
                    }
                }
                if (optionList[i].type == MenuType.MusicToggle)
                {
                    if (Game.gameSettings.musicEnabled)
                    {
                        Game.spriteBatch.DrawString(Game.menuFont, "On", new Vector2(optionListX + 300, optionListY + i * optionGap), Color.White);
                    }
                    else
                    {
                        Game.spriteBatch.DrawString(Game.menuFont, "Off", new Vector2(optionListX + 300, optionListY + i * optionGap), Color.White);
                    }
                }
            }
            if (scoreX != -1)
            {
                String message = "Score: " + score;
                Game.spriteBatch.DrawString(Game.spriteFont, message, new Vector2(scoreX, scoreY), Color.LightGreen);
            }
        }
示例#7
0
        public void Draw()
        {
            if (highScoreData == null)
            {
                highScoreData = HighScoreTracker.LoadHighScores();
            }
            for (int i = 0; i < levelList.Count; i++)
            {
                int t = (i - currentLevel) * 100;
                if (state == SelectMenuState.SWAPRIGHT)
                {
                    t += 100;
                    t -= animateTime * 100 / swapTime;
                }
                if (state == SelectMenuState.SWAPLEFT)
                {
                    t -= 100;
                    t += animateTime * 100 / swapTime;
                }
                int   x     = t * 3;
                int   y     = -t * t / 100;
                float scale = Math.Max(0, .50f - (t * t) / 50000f);
                if (state == SelectMenuState.SELECTING)
                {
                    if (i != currentLevel)
                    {
                        scale = Math.Max(0, .50f - (t * t) / 50000f) * (1f - animateTime / 1000f);
                    }
                    else
                    {
                        scale = .5f + .5f * (animateTime / 1000f);
                        y     = (int)(100f * (animateTime / 1000f));
                    }
                }

                LevelData levelData = GetLevelData(i);
                if (levelData.unlocked && !(Guide.IsTrialMode && levelList[i].fullVersionOnly))
                {
                    JellyfishRenderer.DrawJellyfish(x + selectedJellyX, selectedJellyY + y, 100, levelList[i].texture, scale);
                }
                else
                {
                    JellyfishRenderer.DrawJellyfish(x + selectedJellyX, selectedJellyY + y, 100, JellyfishRenderer.mysteryJelly, scale);
                }
            }
            if (state == SelectMenuState.DOCTORIN)
            {
                JellyfishRenderer.DrawJellyfish(doctorX - docShift + (int)(docShift * animateTime / 500f), doctorY, 100, JellyfishRenderer.doctorJellyfish, 1f);
                JellyfishRenderer.DrawJellyfish(nurseX + docShift - (int)(docShift * animateTime / 500f), nurseY, 100, JellyfishRenderer.nurseJellyfish, 1f);
            }
            if (state == SelectMenuState.TEXT)
            {
                JellyfishRenderer.DrawJellyfish(doctorX, doctorY, 100, JellyfishRenderer.doctorJellyfish, 1f);
                JellyfishRenderer.DrawJellyfish(nurseX, nurseY, 100, JellyfishRenderer.nurseJellyfish, 1f);
            }
            if (state == SelectMenuState.DOCTOROUT)
            {
                JellyfishRenderer.DrawJellyfish(doctorX - (int)(docShift * animateTime / 500f), doctorY, 100, JellyfishRenderer.doctorJellyfish, 1f);
                JellyfishRenderer.DrawJellyfish(nurseX + (int)(docShift * animateTime / 500f), nurseY, 100, JellyfishRenderer.nurseJellyfish, 1f);
            }
            if (state == SelectMenuState.READY || state == SelectMenuState.SWAPLEFT || state == SelectMenuState.SWAPRIGHT)
            {
                Game.spriteBatch.DrawString(Game.spriteFont, levelList[currentLevel].name, new Vector2(nameX + 50, nameY), Color.LightGreen);
                if (currentLevel > 0)
                {
                    Game.spriteBatch.DrawString(Game.spriteFont, "<", new Vector2(nameX, nameY), Color.LightGreen);
                }
                if (currentLevel < levelList.Count - 1)
                {
                    Game.spriteBatch.DrawString(Game.spriteFont, ">", new Vector2(nameX + 250, nameY), Color.LightGreen);
                }

                // Draw stars
                LevelData levelData    = GetLevelData(currentLevel);
                int       ratingOffset = 0;
                if (levelList[currentLevel].mode == GameMode.Puzzle)
                {
                    ratingOffset = previewOffset;
                }
                for (int i = 0; i < 3; i++)
                {
                    Game.spriteBatch.Draw(emptyStar,
                                          new Rectangle(ratingX + 75 * i - ratingOffset, ratingY + 40, 64, 64), Color.White);
                }
                if (levelData.played == true)
                {
                    Game.spriteBatch.Draw(star,
                                          new Rectangle(ratingX - ratingOffset, ratingY + 40, 64, 64), Color.White);
                    if (levelData.rank >= 2)
                    {
                        Game.spriteBatch.Draw(star,
                                              new Rectangle(ratingX + 75 - ratingOffset, ratingY + 40, 64, 64), Color.White);
                    }
                    if (levelData.rank >= 3)
                    {
                        Game.spriteBatch.Draw(star,
                                              new Rectangle(ratingX + 150 - ratingOffset, ratingY + 40, 64, 64), Color.White);
                    }
                }
                if (levelList[currentLevel].mode == GameMode.TimeAttack)
                {
                    String difficultyString = "BUG";
                    if (levelList[currentLevel].difficulty == Difficulty.EASY)
                    {
                        difficultyString = "Beginner";
                    }
                    if (levelList[currentLevel].difficulty == Difficulty.MEDIUM)
                    {
                        difficultyString = "Standard";
                    }
                    if (levelList[currentLevel].difficulty == Difficulty.HARD)
                    {
                        difficultyString = "Advanced";
                    }
                    Game.spriteBatch.DrawString(Game.spriteFont, "Difficulty: " + difficultyString, new Vector2(highScoreX - 20, highScoreY), Color.LightGreen);

                    Game.spriteBatch.DrawString(Game.spriteFont, "High Scores", new Vector2(highScoreX, highScoreY + 30), Color.LightGreen);

                    levelData = highScoreData.timeAttackLevels[currentLevel];
                    for (int i = 1; i < 6; i++)
                    {
                        Game.spriteBatch.DrawString(Game.spriteFont, i + ": " + levelData.playerNames[i - 1] + " - " + levelData.highScores[i - 1], new Vector2(highScoreX, highScoreY + highScoreLine * i + 35), Color.LightGreen);
                    }
                }
                else if (levelList[currentLevel].mode == GameMode.MoveChallenge)
                {
                    String difficultyString = "BUG";
                    if (levelList[currentLevel].difficulty == Difficulty.EASY)
                    {
                        difficultyString = "Beginner";
                    }
                    if (levelList[currentLevel].difficulty == Difficulty.MEDIUM)
                    {
                        difficultyString = "Standard";
                    }
                    if (levelList[currentLevel].difficulty == Difficulty.HARD)
                    {
                        difficultyString = "Advanced";
                    }
                    Game.spriteBatch.DrawString(Game.spriteFont, "Difficulty: " + difficultyString, new Vector2(highScoreX - 20, highScoreY), Color.LightGreen);

                    Game.spriteBatch.DrawString(Game.spriteFont, "High Scores", new Vector2(highScoreX, highScoreY + 30), Color.LightGreen);
                    if (highScoreData == null)
                    {
                        highScoreData = HighScoreTracker.LoadHighScores();
                    }
                    for (int i = 1; i < 6; i++)
                    {
                        Game.spriteBatch.DrawString(Game.spriteFont, i + ": " + levelData.playerNames[i - 1] + " - " + levelData.highScores[i - 1], new Vector2(highScoreX, highScoreY + highScoreLine * i + 35), Color.LightGreen);
                    }
                }
                else
                {
                    String difficultyString = "BUG";
                    if (levelList[currentLevel].difficulty == Difficulty.EASY)
                    {
                        difficultyString = "Beginner";
                    }
                    if (levelList[currentLevel].difficulty == Difficulty.MEDIUM)
                    {
                        difficultyString = "Standard";
                    }
                    if (levelList[currentLevel].difficulty == Difficulty.HARD)
                    {
                        difficultyString = "Advanced";
                    }
                    Game.spriteBatch.DrawString(Game.spriteFont, "Difficulty: " + difficultyString, new Vector2(highScoreX - 20 - previewOffset, highScoreY), Color.LightGreen);
                    Game.spriteBatch.DrawString(Game.spriteFont, "High Scores", new Vector2(highScoreX - previewOffset, highScoreY + 30), Color.LightGreen);
                    if (highScoreData == null)
                    {
                        highScoreData = HighScoreTracker.LoadHighScores();
                    }
                    for (int i = 1; i < 6; i++)
                    {
                        TimeSpan t = new TimeSpan(0, 0, 0, 0, levelData.highScores[i - 1]);
                        Game.spriteBatch.DrawString(Game.spriteFont, string.Format("{0}:{1} - {2}:{3:D2}", i, levelData.playerNames[i - 1], t.Minutes, t.Seconds), new Vector2(highScoreX - previewOffset, highScoreY + highScoreLine * i + 35), Color.LightGreen);
                    }
                    Game.spriteBatch.Draw(levelList[currentLevel].preview, new Rectangle(previewX, previewY, 625 / 2, 469 / 2), Color.White);
                }
            }
            if (state == SelectMenuState.TEXT)
            {
                LevelData levelData = GetLevelData(currentLevel);

                if (levelData.unlocked && !(Guide.IsTrialMode && levelList[currentLevel].fullVersionOnly))
                {
                    if (textPieces[currentTextPiece].Split(':')[0] == "D")
                    {
                        JellyfishRenderer.DrawSpeechBubble(speechX, speechY, 100, SpriteEffects.None);
                    }
                    else
                    {
                        JellyfishRenderer.DrawSpeechBubble(speechX, speechY, 100, SpriteEffects.FlipHorizontally);
                    }
                    String text = textPieces[currentTextPiece].Split(':')[1];
                    Game.spriteBatch.DrawString(Game.spriteFont, text, new Vector2(speechX - 250, speechY), Color.Black);
                }
                else if (Guide.IsTrialMode && levelList[currentLevel].fullVersionOnly)
                {
                    JellyfishRenderer.DrawSpeechBubble(speechX, speechY, 100, SpriteEffects.None);
                    Game.spriteBatch.DrawString(Game.spriteFont, "This patient is only available on the full version\nof Jellyfish, MD. Go to the main menu to unlock it!", new Vector2(speechX - 250, speechY), Color.Black);
                }
                else
                {
                    JellyfishRenderer.DrawSpeechBubble(speechX, speechY, 100, SpriteEffects.None);
                    if (levelList[currentLevel].mode == GameMode.Puzzle)
                    {
                        if (levelList[currentLevel].difficulty == Difficulty.MEDIUM)
                        {
                            Game.spriteBatch.DrawString(Game.spriteFont, "Earn two stars on any Beginner puzzle \nto unlock this patient!", new Vector2(speechX - 250, speechY), Color.Black);
                        }
                        else if (levelList[currentLevel].difficulty == Difficulty.HARD)
                        {
                            Game.spriteBatch.DrawString(Game.spriteFont, "Earn two stars on any Standard puzzle \nto unlock this patient!", new Vector2(speechX - 250, speechY), Color.Black);
                        }
                    }
                    else
                    {
                        Game.spriteBatch.DrawString(Game.spriteFont, "Earn two stars on the previous jellyfish \nto unlock this patient!", new Vector2(speechX - 250, speechY), Color.Black);
                    }
                }
            }
        }
示例#8
0
 public void Draw()
 {
     if (state != JellyfishCityState.SPAWN)
     {
         foreach (Jellyfish j in jellyList)
         {
             if (j.texture == JellyfishRenderer.doctorJellyfish)
             {
                 if (j.left)
                 {
                     JellyfishRenderer.DrawJellyfish((int)(j.posX), (int)(j.posY), 100, j.texture, .5f, SpriteEffects.FlipHorizontally);
                 }
                 else
                 {
                     JellyfishRenderer.DrawJellyfish((int)(j.posX), (int)(j.posY), 100, j.texture, .5f, SpriteEffects.None);
                 }
             }
             else
             {
                 JellyfishRenderer.DrawJellyfish((int)(j.posX), (int)(j.posY), 100, j.texture, .35f);
             }
         }
     }
     if (state == JellyfishCityState.NURSEIN)
     {
         JellyfishRenderer.DrawJellyfish(nurseX - 300 + 300 * animateTime / 250, nurseY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
     }
     if (state == JellyfishCityState.NURSEOUT)
     {
         JellyfishRenderer.DrawJellyfish(nurseX - 300 * animateTime / 250, nurseY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
     }
     if (state == JellyfishCityState.HELLO || state == JellyfishCityState.GOODBYE)
     {
         JellyfishRenderer.DrawJellyfish(nurseX, nurseY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
         JellyfishRenderer.DrawSpeechBubble(speechX, speechY, 100, SpriteEffects.None);
         if (state == JellyfishCityState.HELLO)
         {
             if (jelliesSaved == totalJellies)
             {
                 Game.spriteBatch.DrawString(Game.spriteFont, "Wow! Way to go! You've saved all the Jellyfish!\nEven Dr. Jellyfish is ready to join the parade!", new Vector2(speechX - 265, speechY), Color.Black);
             }
             else if (jelliesSaved == totalJellies - 1)
             {
                 Game.spriteBatch.DrawString(Game.spriteFont, "You've rescued " + jelliesSaved + " Jellyfish! Just one more to go!\nTry to score 3 stars!", new Vector2(speechX - 265, speechY), Color.Black);
             }
             else
             {
                 Game.spriteBatch.DrawString(Game.spriteFont, "You've rescued " + jelliesSaved + " jellyfish! " + (totalJellies - jelliesSaved) + " more patients still\nneed your help. Score 3 stars on each Jellyfish!", new Vector2(speechX - 265, speechY), Color.Black);
             }
         }
         if (state == JellyfishCityState.GOODBYE)
         {
             Game.spriteBatch.DrawString(Game.spriteFont, "Come back soon!", new Vector2(speechX - 270, speechY), Color.Black);
         }
         Game.spriteBatch.Draw(HelpOverlay.summary_confirm, new Rectangle(speechX + 255, speechY + 60, 25, 25), Color.Green);
     }
     if (state == JellyfishCityState.VIEW)
     {
         Game.spriteBatch.DrawString(Game.spriteFont, "Done", new Vector2(1090, 655), Color.White);
         Game.spriteBatch.Draw(HelpOverlay.summary_confirm, new Rectangle(1150, 650, 40, 40), Color.Green);
     }
 }
示例#9
0
        public void Draw()
        {
            Game.spriteBatch.Draw(background, new Rectangle(0, 0, Game.screenSizeX, Game.screenSizeY), Color.White);
            Game.spriteBatch.Draw(header, new Rectangle(headerX, headerY, headerWidth, headerHeight), Color.White);
            for (int i = 0; i < optionList.Count; i++)
            {
                if (i == selectedIndex && state != GameOverMenuState.INITIALS)
                {
                    PuzzleNode p = new PuzzleNode(Game.jellyBlue);
                    p.screenX = optionListX - 25;
                    p.screenY = optionListY + optionHeight / 2 + i * optionGap;
                    if (state == GameOverMenuState.ANIMATEDOWN)
                    {
                        p.screenY -= (int)(optionGap * (1f - (float)animateTime / (float)250));
                    }
                    if (state == GameOverMenuState.ANIMATEUP)
                    {
                        p.screenY += (int)(optionGap * (1f - (float)animateTime / (float)250));
                    }

                    p.distance = 50;
                    p.scale    = 1f;
                    OrbRenderer.DrawOrb(p, State.READY, 0f);
                    Game.spriteBatch.DrawString(Game.menuFont, optionList[i].optionText, new Vector2(optionListX, optionListY + i * optionGap), Color.LightGreen);
                }
                else
                {
                    Game.spriteBatch.DrawString(Game.menuFont, optionList[i].optionText, new Vector2(optionListX, optionListY + i * optionGap), Color.White);
                }
            }
            if (state == GameOverMenuState.DOCTORIN)
            {
                JellyfishRenderer.DrawJellyfish(doctorX + 800 - 600 * animateTime / 250, doctorY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
                JellyfishRenderer.DrawJellyfish(doctorX + 600 - 600 * animateTime / 250, doctorY, 100, JellyfishRenderer.doctorJellyfish, .75f, SpriteEffects.FlipHorizontally);
            }
            else if (state == GameOverMenuState.DOCTOROUT)
            {
                JellyfishRenderer.DrawJellyfish(doctorX + 200 + 600 * animateTime / 250, doctorY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
                JellyfishRenderer.DrawJellyfish(doctorX + 600 * animateTime / 250, doctorY, 100, JellyfishRenderer.doctorJellyfish, .75f, SpriteEffects.FlipHorizontally);
            }
            else
            {
                JellyfishRenderer.DrawJellyfish(doctorX + 200, doctorY, 100, JellyfishRenderer.nurseJellyfish, .75f, SpriteEffects.FlipHorizontally);
                JellyfishRenderer.DrawJellyfish(doctorX, doctorY, 100, JellyfishRenderer.doctorJellyfish, .75f, SpriteEffects.FlipHorizontally);
            }
            if (Game.currentSettings.mode == GameMode.Puzzle)
            {
                TimeSpan t = new TimeSpan(0, 0, 0, 0, score);
                Game.spriteBatch.DrawString(Game.spriteFont, string.Format("TIME: {0}:{1:D2}", t.Minutes, t.Seconds), new Vector2(scoreX, scoreY), Color.LightGreen, 0, Vector2.Zero, 1.6f, SpriteEffects.None, 0);
                for (int i = 0; i < 3; i++)
                {
                    Game.spriteBatch.Draw(emptyStar,
                                          new Rectangle(scoreX + 75 * i, scoreY + 50, 64, 64), Color.White);
                }
                Game.spriteBatch.Draw(star,
                                      new Rectangle(scoreX, scoreY + 50, 64, 64), Color.White);
                if (score <= Game.currentSettings.two_star)
                {
                    Game.spriteBatch.Draw(star,
                                          new Rectangle(scoreX + 75, scoreY + 50, 64, 64), Color.White);
                }
                if (score <= Game.currentSettings.three_star)
                {
                    Game.spriteBatch.Draw(star,
                                          new Rectangle(scoreX + 150, scoreY + 50, 64, 64), Color.White);
                }
            }
            else
            {
                Game.spriteBatch.DrawString(Game.spriteFont, "SCORE:" + score, new Vector2(scoreX, scoreY), Color.LightGreen, 0, Vector2.Zero, 1.6f, SpriteEffects.None, 0);
                for (int i = 0; i < 3; i++)
                {
                    Game.spriteBatch.Draw(emptyStar,
                                          new Rectangle(scoreX + 75 * i, scoreY + 50, 64, 64), Color.White);
                }
                Game.spriteBatch.Draw(star,
                                      new Rectangle(scoreX, scoreY + 50, 64, 64), Color.White);
                if (score >= Game.currentSettings.two_star)
                {
                    Game.spriteBatch.Draw(star,
                                          new Rectangle(scoreX + 75, scoreY + 50, 64, 64), Color.White);
                }
                if (score >= Game.currentSettings.three_star)
                {
                    Game.spriteBatch.Draw(star,
                                          new Rectangle(scoreX + 150, scoreY + 50, 64, 64), Color.White);
                }
            }

            if (levelData != null)
            {
                Game.spriteBatch.DrawString(Game.spriteFont, "High Scores", new Vector2(highScoreX, highScoreY), Color.LightGreen, 0, Vector2.Zero, 1.6f, SpriteEffects.None, 0);
                for (int i = 1; i < 6; i++)
                {
                    if (i - 1 == rank)
                    {
                        if (Game.currentSettings.mode == GameMode.Puzzle)
                        {
                            TimeSpan t = new TimeSpan(0, 0, 0, 0, levelData.highScores[i - 1]);
                            Game.spriteBatch.DrawString(Game.spriteFont, string.Format("{0}: {1}:{2:D2}", levelData.playerNames[i - 1], t.Minutes, t.Seconds), new Vector2(highScoreX, highScoreY + highScoreLine * (i + 1) + 4), Color.White, 0, Vector2.Zero, 1.5f, SpriteEffects.None, 0);
                        }
                        else
                        {
                            Game.spriteBatch.DrawString(Game.spriteFont, i + ": " + levelData.playerNames[i - 1] + " - " + levelData.highScores[i - 1], new Vector2(highScoreX, highScoreY + highScoreLine * (i + 1) + 4), Color.White, 0, Vector2.Zero, 1.5f, SpriteEffects.None, 0);
                        }
                    }
                    else
                    {
                        if (Game.currentSettings.mode == GameMode.Puzzle)
                        {
                            TimeSpan t = new TimeSpan(0, 0, 0, 0, levelData.highScores[i - 1]);
                            Game.spriteBatch.DrawString(Game.spriteFont, string.Format("{0}: {1}:{2:D2}", levelData.playerNames[i - 1], t.Minutes, t.Seconds), new Vector2(highScoreX, highScoreY + highScoreLine * (i + 1) + 5), Color.LightGreen, 0, Vector2.Zero, 1.4f, SpriteEffects.None, 0);
                        }
                        else
                        {
                            Game.spriteBatch.DrawString(Game.spriteFont, i + ": " + levelData.playerNames[i - 1] + " - " + levelData.highScores[i - 1], new Vector2(highScoreX, highScoreY + highScoreLine * (i + 1) + 5), Color.LightGreen, 0, Vector2.Zero, 1.4f, SpriteEffects.None, 0);
                        }
                    }
                }
            }

            if (currentCharacter > 2 || rank == -1)
            {
                JellyfishRenderer.DrawSpeechBubble2(speechX, speechY, 100, SpriteEffects.FlipHorizontally);
                Game.spriteBatch.DrawString(Game.spriteFont, congratulationsMessage, new Vector2(speechX - 260, speechY), Color.Black);
            }

            if (rank != -1 && currentCharacter <= 2)
            {
                JellyfishRenderer.DrawSpeechBubble2(speechX, speechY, 100, SpriteEffects.FlipHorizontally);
                Game.spriteBatch.DrawString(Game.spriteFont, "Way to go! You got a high score! Please enter", new Vector2(speechX - 260, speechY), Color.Black);
                Game.spriteBatch.DrawString(Game.spriteFont, "your initials: ", new Vector2(speechX - 260, speechY + 25), Color.Black);
                Game.spriteBatch.DrawString(Game.spriteFont, "" + initials[2], new Vector2(speechX - 70, speechY + 25), Color.Black, 0, Vector2.Zero, 1f, SpriteEffects.None, 0);
                Game.spriteBatch.DrawString(Game.spriteFont, "" + initials[1], new Vector2(speechX - 95, speechY + 25), Color.Black, 0, Vector2.Zero, 1f, SpriteEffects.None, 0);
                Game.spriteBatch.DrawString(Game.spriteFont, "" + initials[0], new Vector2(speechX - 120, speechY + 25), Color.Black, 0, Vector2.Zero, 1f, SpriteEffects.None, 0);
                Game.spriteBatch.DrawString(Game.spriteFont, "^", new Vector2(speechX - 120 + 25 * currentCharacter, speechY + 45), Color.Black, 0, Vector2.Zero, 1f, SpriteEffects.None, 0);
            }
        }