示例#1
0
 public static void Draw(SpriteBatch Spritebatch)
 {
     if (menu_state == MenuState.main)
     {
         Spritebatch.Draw(menuBackground, new Rectangle(0, 0, LeaveMeAlone.WindowX, LeaveMeAlone.WindowY), Color.Black);
         Spritebatch.Draw(titleCard, new Rectangle(LeaveMeAlone.WindowX / 2 - 200, 0, 400, 200), Color.White);
         newGame.Draw(Spritebatch);
         if (!isNewGame)
         {
             loadGame.Draw(Spritebatch);
         }
         quit.Draw(Spritebatch);
     }
     else if (menu_state == MenuState.opening)
     {
         Spritebatch.Draw(opening_scene, new Rectangle(-(landscape_timer) / 5, 0, (int)(LeaveMeAlone.WindowX * 1.5), LeaveMeAlone.WindowY), Color.White);
         landscape_timer++;
         if (line_number < opening_monologue.Count())
         {
             opening_monologue[line_number].Draw(Spritebatch);
         }
         else
         {
             if (opening_timer == 359)
             {
                 Console.WriteLine("it's time");
             }
             Spritebatch.Draw(menuBackground, new Rectangle(0, 0, LeaveMeAlone.WindowX, LeaveMeAlone.WindowY), new Color(Color.Black, (int)(Math.Sqrt((double)opening_timer / 300) * 255)));
             Spritebatch.Draw(titleCard, new Rectangle(LeaveMeAlone.WindowX / 2 - 200, 0, 400, 200), Color.White);
         }
         skip_intro.Draw(Spritebatch);
         next_intro.Draw(Spritebatch);
     }
     else
     {
         Spritebatch.Draw(menuBackground, new Rectangle(0, 0, LeaveMeAlone.WindowX, LeaveMeAlone.WindowY), Color.Black);
         Spritebatch.Draw(titleCard, new Rectangle(LeaveMeAlone.WindowX / 2 - 200, 0, 400, 200), Color.White);
         brute.Draw(Spritebatch, Color.White);
         mastermind.Draw(Spritebatch, Color.White);
         operative.Draw(Spritebatch, Color.White);
         if (bruteHover)
         {
             Spritebatch.Draw(bruteTitle, new Rectangle(LeaveMeAlone.WindowX / 2 - 370, LeaveMeAlone.WindowY - 250, 150, 50), Color.White);
             bruteText.Draw(Spritebatch, pos: new Vector2(LeaveMeAlone.WindowX / 2 - 370, LeaveMeAlone.WindowY - 200));
         }
         if (mastermindHover)
         {
             Spritebatch.Draw(mastermindTitle, new Rectangle(LeaveMeAlone.WindowX / 2 - 100, LeaveMeAlone.WindowY - 250, 225, 50), Color.White);
             mastermindText.Draw(Spritebatch, pos: new Vector2(LeaveMeAlone.WindowX / 2 - 100, LeaveMeAlone.WindowY - 200));
         }
         if (operativeHover)
         {
             Spritebatch.Draw(operativeTitle, new Rectangle(LeaveMeAlone.WindowX / 2 + 220, LeaveMeAlone.WindowY - 250, 200, 50), Color.White);
             operativeText.Draw(Spritebatch, pos: new Vector2(LeaveMeAlone.WindowX / 2 + 220, LeaveMeAlone.WindowY - 200));
         }
     }
 }
示例#2
0
        public static void Draw(SpriteBatch sb)
        {
            sb.Draw(menuBackground, LeaveMeAlone.BackgroundRect, Color.Black);
            selectedBoss.Draw(sb, Color.White);

            if (BattleManager.boss.level < 2)
            {
                TutorialText.Draw(sb);
            }
            next.Draw(sb);
            sb.Draw(green, full_exp, Color.Green);
            sb.Draw(empty_exp, new Vector2(150, 100), Color.White);
            exp_text.Draw(sb, c: Color.Azure);

            foreach (Button button in skilltree.SkillButtons.Values)
            {
                if (button.text.color == Color.Red)
                {
                    button.Draw(sb, true);
                }
                else
                {
                    button.Draw(sb);
                }
            }
            foreach (Text t in texts.Values)
            {
                t.Draw(sb);
                //Console.WriteLine(t.message);
            }
            for (int x = 0; x < SelectedSkills.Length; x++)
            {
                if (SelectedSkills[x].b.text.message == "NONE")
                {
                    SelectedSkills[x].b.Draw(sb, true);
                }
                else
                {
                    SelectedSkills[x].Draw(sb);
                }
            }
            for (int x = 0; x < AvailableRooms.Length; x++)
            {
                if (BattleManager.boss.selected_rooms.Contains(AvailableRooms[x].r) == false && AvailableRooms[x].r.level != -1)
                {
                    if (AvailableRooms[x].r.cost > Resources.gold)
                    {
                        sb.Draw(Button.redbackground, AvailableRooms[x].b.selectRectangle, Color.White);
                        AvailableRooms[x].b.Draw(sb);
                        sb.Draw(Button.redbackground, AvailableRooms[x].b.selectRectangle, Color.White * 0.2f);
                    }
                    else
                    {
                        sb.Draw(Button.bluebackground, AvailableRooms[x].b.selectRectangle, Color.White);
                        AvailableRooms[x].b.Draw(sb);
                        sb.Draw(Button.bluebackground, AvailableRooms[x].b.selectRectangle, Color.White * 0.2f);
                        //sb.Draw(Button.redbackground, AvailableRooms[x].b.selectRectangle, Color.White*0.5f);
                    }
                }
                else
                {
                    sb.Draw(Button.graybackground, AvailableRooms[x].b.selectRectangle, Color.White);
                    AvailableRooms[x].b.Draw(sb);
                }
            }

            if (hovertext.message != "")
            {
                Rectangle scaledHoverTextRect = new Rectangle(hovertextRect.X, hovertextRect.Y, hovertextRect.Width, (int)measurements.Y);

                hovertext.position = new Vector2(hovertextRect.X + 10, hovertextRect.Y + 10);
                sb.Draw(hovertextbackground, scaledHoverTextRect, Color.White);
                hovertext.Draw(sb, maxLineWidth: hovertextRect.Width - 15);
            }

            sb.Draw(hovertextbackground, statsTitleRect, Color.White);
            statsTitle.Draw(sb);
            if (statsText.message != "")
            {
                sb.Draw(hovertextbackground, statsTextRect, Color.White);
                statsText.Draw(sb);
            }



            if (BattleManager.boss.level < 2)
            {
                sb.Draw(green, highlighter_rect, new Color(Color.LimeGreen, 120));
            }
        }