Пример #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 != 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);
     }
 }
Пример #3
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);
             }
         }
     }
 }
Пример #4
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);
                    }
                }
            }
        }
Пример #5
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);
     }
 }