Exemple #1
0
        public void Draw(SpriteBatch spriteBatch)
        {
            int tempy = 0;
            int tempx = 0;

            for (int x = 0; x <= RAM.GetPlayerCount(); x++)
            {
                if ((x % 2) == 1)
                {
                    spriteBatch.Draw(background4, new Vector2(160 + (480 * tempx), 48 + (156 * tempy)), Color.White);
                    spriteBatch.Draw(Avatar1, new Vector2(160 + (480 * tempx), 48 + (156 * tempy)), Color.White);
                    spriteBatch.DrawString(RAM.GetFont(1), "LV", new Vector2(448 + (480 * tempx), 61 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(1), "HP", new Vector2(256 + (480 * tempx), 89 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(1), "MP", new Vector2(256 + (480 * tempx), 119 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(1), "SP", new Vector2(256 + (480 * tempx), 145 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(1), "Next LV", new Vector2(256 + (480 * tempx), 171 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(1), RAM.GetPlayer(x).name, new Vector2(272 + (480 * tempx), 74 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).name) / 2, 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).Level.ToString(), new Vector2(500 + (480 * tempx), 58 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).HP.ToString() + "/" + RAM.GetPlayer(x).MaxHP.ToString(), new Vector2(448 + (480 * tempx), 100 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).HP.ToString() + "/" + RAM.GetPlayer(x).MaxHP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).MP.ToString() + "/" + RAM.GetPlayer(x).MaxMP.ToString(), new Vector2(448 + (480 * tempx), 126 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).MP.ToString() + "/" + RAM.GetPlayer(x).MaxMP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).SP.ToString() + "/" + RAM.GetPlayer(x).MaxSP.ToString(), new Vector2(448 + (480 * tempx), 152 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).SP.ToString() + "/" + RAM.GetPlayer(x).MaxSP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).EXP.ToString(), new Vector2(448 + (480 * tempx), 168 + (156 * tempy)), Color.White, 0, new Vector2(-100, 0), 1.0f, SpriteEffects.None, 0.5f);
                    tempy++;
                }
                else
                {
                    spriteBatch.Draw(background5, new Vector2(160 + (480 * tempx), 48 + (156 * tempy)), Color.White);
                    spriteBatch.Draw(Avatar1, new Vector2(160 + (480 * tempx), 48 + (156 * tempy)), Color.White);
                    spriteBatch.DrawString(RAM.GetFont(1), "LV", new Vector2(448 + (480 * tempx), 61 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(1), "HP", new Vector2(256 + (480 * tempx), 89 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(1), "MP", new Vector2(256 + (480 * tempx), 119 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(1), "SP", new Vector2(256 + (480 * tempx), 145 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(1), "Next LV", new Vector2(256 + (480 * tempx), 171 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(1), RAM.GetPlayer(x).name, new Vector2(272 + (480 * tempx), 74 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).name) / 2, 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).Level.ToString(), new Vector2(500 + (480 * tempx), 58 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).HP.ToString() + "/" + RAM.GetPlayer(x).MaxHP.ToString(), new Vector2(448 + (480 * tempx), 100 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).HP.ToString() + "/" + RAM.GetPlayer(x).MaxHP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).MP.ToString() + "/" + RAM.GetPlayer(x).MaxMP.ToString(), new Vector2(448 + (480 * tempx), 126 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).MP.ToString() + "/" + RAM.GetPlayer(x).MaxMP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).SP.ToString() + "/" + RAM.GetPlayer(x).MaxSP.ToString(), new Vector2(448 + (480 * tempx), 152 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).SP.ToString() + "/" + RAM.GetPlayer(x).MaxSP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                    spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).EXP.ToString(), new Vector2(448 + (480 * tempx), 168 + (156 * tempy)), Color.White, 0, new Vector2(-100, 0), 1.0f, SpriteEffects.None, 0.5f);
                    tempx++;
                    if (tempx == 2)
                    {
                        tempx = 0;
                    }
                }
            }
            spriteBatch.Draw(GetPointer().GetTexture(), GetPointer().GetPosition(), Color.White);
        }
        public void Draw(SpriteBatch spriteBatch)
        {
            for (int x = 0; x <= 8; x++)
            {
                Vector2 FontOrigin = RAM.GetFont(0).MeasureString(GetText(x)) / 2;
                Vector2 FontPos    = new Vector2(100, 320 + (x * 30));
                spriteBatch.DrawString(RAM.GetFont(0), GetText(x), FontPos, Color.Yellow, 0, FontOrigin, 1.0f, SpriteEffects.None, 0.5f);
                Vector2 FontOrigin2 = RAM.GetFont(0).MeasureString(GetStatText(x).ToString()) / 2;
                Vector2 FontPos2    = new Vector2(300, 320 + (x * 30));
                spriteBatch.DrawString(RAM.GetFont(0), GetStatText(x).ToString(), FontPos2, Color.Yellow, 0, FontOrigin2, 1.0f, SpriteEffects.None, 0.5f);
            }
            Vector2 FontOrigin3 = RAM.GetFont(0).MeasureString(RAM.GetPlayer(GetPlayerIndex()).name) / 2;
            Vector2 FontPos3    = new Vector2(300, 120);

            spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(GetPlayerIndex()).name, FontPos3, Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
        }
Exemple #3
0
 public void Draw(SpriteBatch spriteBatch)
 {
     if (ItemGet == true)
     {
         if (time.GetTimeFlag() == true)
         {
             TimePassedFlag = true;
         }
         else
         {
             if (TimePassedFlag == false)
             {
                 spriteBatch.DrawString(RAM.GetFont(0), Item.name + " x " + Item.count, new Vector2(GetPosition().X, (GetPosition().Y) - (float)(time.GetTime() / 35)), Color.White, 0,
                                        RAM.GetFont(0).MeasureString(Item.name) / 2, 1.0f, SpriteEffects.None, 0.5f);
             }
         }
     }
 }
Exemple #4
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (RAM.TalkFlag == true)
            {
                spriteBatch.Draw(RAM.LoadContent(@"TextBox"), new Vector2(RAM.camera.GetTextBoxPosition().X - XFORMATING, RAM.camera.GetTextBoxPosition().Y + YFORMATING), Color.White);

                try
                {
                    for (int x = 0; x <= Letter; x++)
                    {
                        if (x <= StringList[LineCounter].Length - 1)
                        {
                            spriteBatch.DrawString(RAM.GetFont(0), StringList[LineCounter][x].ToString(), new Vector2((RAM.camera.GetTextBoxPosition().X - 590) + (x * KERN), (RAM.camera.GetTextBoxPosition().Y + 215) + (LineCounter * LINESPACE)), Color.White);
                        }
                        if (LineCounter + 1 <= StringList.Count - 1)
                        {
                            if (x <= StringList[LineCounter + 1].Length - 1)
                            {
                                spriteBatch.DrawString(RAM.GetFont(0), StringList[(LineCounter + 1)][x].ToString(), new Vector2((RAM.camera.GetTextBoxPosition().X - 590) + (x * KERN), (RAM.camera.GetTextBoxPosition().Y + 215) + ((LineCounter + 1) * LINESPACE)), Color.White);
                            }
                        }
                        if (LineCounter + 2 <= StringList.Count - 1)
                        {
                            if (x <= StringList[LineCounter + 2].Length - 1)
                            {
                                spriteBatch.DrawString(RAM.GetFont(0), StringList[(LineCounter + 2)][x].ToString(), new Vector2((RAM.camera.GetTextBoxPosition().X - 590) + (x * KERN), (RAM.camera.GetTextBoxPosition().Y + 215) + ((LineCounter + 2) * LINESPACE)), Color.White);
                            }
                        }
                        if (LineCounter + 3 <= StringList.Count - 1)
                        {
                            if (x <= StringList[LineCounter + 3].Length - 1)
                            {
                                spriteBatch.DrawString(RAM.GetFont(0), StringList[(LineCounter + 3)][x].ToString(), new Vector2((RAM.camera.GetTextBoxPosition().X - 590) + (x * KERN), (RAM.camera.GetTextBoxPosition().Y + 215) + ((LineCounter + 3) * LINESPACE)), Color.White);
                            }
                        }
                    }
                }
                catch (ArgumentOutOfRangeException)
                { }
            }
        }
        public EquipmentMenu()
            : base()
        {
            Font1        = RAM.GetFont(0);
            stats        = new string[10];
            statsnum     = new int[10];
            stats[0]     = "LV";
            stats[1]     = "HP";
            stats[2]     = "MP";
            stats[3]     = "SP";
            stats[4]     = "ATK";
            stats[5]     = "DEF";
            stats[6]     = "INT";
            stats[7]     = "RES";
            stats[8]     = "SPD";
            stats[9]     = "EVD";
            Equipment    = new EquipmentItems[10];
            equipment    = new string[10];
            equipment[0] = "Weapon";
            equipment[1] = "Helmet";
            equipment[2] = "Armor";
            equipment[3] = "Bracers";
            equipment[4] = "Shield";
            equipment[5] = "Greaves";
            equipment[6] = "Accessory";
            equipment[7] = "Accessory";
            equipment[8] = "Accessory";
            equipment[9] = "Accessory";
            // EquipmentItemList.Add(new WeaponItem());
            //EquipmentItemList.Add(new HelmetItem());
            //EquipmentItemList.Add(new ArmorItem());
            //EquipmentItemList.Add(new BracersItem());
            //EquipmentItemList.Add(new ShieldItem());
            //EquipmentItemList.Add(new GreavesItem());

            //for(int x = 0; x <= RAM.PlayerList.Count - 1
            //RAM.PlayerList
        }
Exemple #6
0
        public void Draw(SpriteBatch spriteBatch)
        {
            foreach (BattleChar obj in ObjectList[0])
            {
                obj.Draw(spriteBatch);
            }

            for (int count = 0; count <= 5; count++)
            {
                spriteBatch.DrawString(RAM.GetFont(0), MenuItems[count], new Vector2(108, 500 + (25 * count)), Color.White, 0, RAM.GetFont(0).MeasureString(MenuItems[count]) / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.Draw(pointer.GetTexture(), pointer.GetPosition(), Color.White);
            }
            //spriteBatch.Draw(MasterDatabase.GetTile(2).GetTexture(), new Vector2(0, 0), Color.White);
            int x = 0;

            foreach (Player player in RAM.PlayerList)
            {
                spriteBatch.DrawString(RAM.GetFont(0), player.name, new Vector2(StatsPos.X + (108 + (256 * x)), StatsPos.Y + 100), Color.White, 0,
                                       RAM.GetFont(0).MeasureString(player.name) / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(0), "LV:", new Vector2(StatsPos.X + (200 + (256 * x)), StatsPos.Y + 100), Color.White, 0,
                                       RAM.GetFont(0).MeasureString("LV:") / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(0), player.Level.ToString(), new Vector2(StatsPos.X + (230 + (256 * x)), StatsPos.Y + 100), Color.White, 0,
                                       RAM.GetFont(0).MeasureString(player.Level.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);


                spriteBatch.DrawString(RAM.GetFont(0), "HP", new Vector2(StatsPos.X + (20 + (256 * x)), StatsPos.Y + 124), Color.White, 0,
                                       RAM.GetFont(0).MeasureString("HP") / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(0), player.HP.ToString(), new Vector2(StatsPos.X + (98 + (256 * x)), StatsPos.Y + 124), Color.White, 0,
                                       RAM.GetFont(0).MeasureString(player.HP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(0), "/", new Vector2(StatsPos.X + (148 + (256 * x)), StatsPos.Y + 124), Color.White, 0,
                                       RAM.GetFont(0).MeasureString("/") / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(0), player.MaxHP.ToString(), new Vector2(StatsPos.X + (198 + (256 * x)), StatsPos.Y + 124), Color.White, 0,
                                       RAM.GetFont(0).MeasureString(player.MaxHP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);


                spriteBatch.DrawString(RAM.GetFont(0), "MP", new Vector2(StatsPos.X + (20 + (256 * x)), StatsPos.Y + 148), Color.White, 0,
                                       RAM.GetFont(0).MeasureString("MP") / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(0), player.MP.ToString(), new Vector2(StatsPos.X + (98 + (256 * x)), StatsPos.Y + 148), Color.White, 0,
                                       RAM.GetFont(0).MeasureString(player.MP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(0), "/", new Vector2(StatsPos.X + (148 + (256 * x)), StatsPos.Y + 148), Color.White, 0,
                                       RAM.GetFont(0).MeasureString("/") / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(0), player.MaxMP.ToString(), new Vector2(StatsPos.X + (198 + (256 * x)), StatsPos.Y + 148), Color.White, 0,
                                       RAM.GetFont(0).MeasureString(player.MaxMP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);


                spriteBatch.DrawString(RAM.GetFont(0), "SP", new Vector2(StatsPos.X + (20 + (256 * x)), StatsPos.Y + 172), Color.White, 0,
                                       RAM.GetFont(0).MeasureString("SP") / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(0), player.SP.ToString(), new Vector2(StatsPos.X + (98 + (256 * x)), StatsPos.Y + 172), Color.White, 0,
                                       RAM.GetFont(0).MeasureString(player.SP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(0), "/", new Vector2(StatsPos.X + (148 + (256 * x)), StatsPos.Y + 172), Color.White, 0,
                                       RAM.GetFont(0).MeasureString("/") / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(0), player.MaxSP.ToString(), new Vector2(StatsPos.X + (198 + (256 * x)), StatsPos.Y + 172), Color.White, 0,
                                       RAM.GetFont(0).MeasureString(player.MaxSP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);

                spriteBatch.DrawString(RAM.GetFont(0), "Next", new Vector2(StatsPos.X + (34 + (256 * x)), StatsPos.Y + 196), Color.White, 0,
                                       RAM.GetFont(0).MeasureString("Next") / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(0), player.EXP.ToString(), new Vector2(StatsPos.X + (198 + (256 * x)), StatsPos.Y + 196), Color.White, 0,
                                       RAM.GetFont(0).MeasureString(player.EXP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                x++;
            }

            /*for (int x = 0; x <= GetObjectCount() - 1; x++)
             * {
             *  GetObject(x).Draw(spriteBatch);
             * }*/
        }
Exemple #7
0
        public void Draw(SpriteBatch spriteBatch)
        {
            int y          = 0;
            int x          = 0;
            int count      = 0;
            int ItemPassed = showingline;

            spriteBatch.Draw(background6, new Vector2(0, 636), Color.White);
            spriteBatch.Draw(background2, new Vector2(0, 0), Color.White);
            spriteBatch.Draw(background7, new Vector2(0, 48), Color.White);
            spriteBatch.Draw(background8, new Vector2(214, 48), Color.White);
            spriteBatch.Draw(background7, new Vector2(428, 48), Color.White);
            spriteBatch.Draw(background8, new Vector2(642, 48), Color.White);
            spriteBatch.Draw(background7, new Vector2(856, 48), Color.White);
            spriteBatch.Draw(background8, new Vector2(1070, 48), Color.White);
            spriteBatch.Draw(background9, new Vector2(214, 72), Color.White);
            spriteBatch.Draw(background10, new Vector2(0, 72), Color.White);
            spriteBatch.Draw(background10, new Vector2(1066, 72), Color.White);
            spriteBatch.DrawString(RAM.GetFont(4), "All", new Vector2(107, 60), Color.White, 0, RAM.GetFont(0).MeasureString("All") / 2, 1.0f, SpriteEffects.None, 0.5f);
            spriteBatch.DrawString(RAM.GetFont(4), "Usable Items", new Vector2(321, 60), Color.White, 0, RAM.GetFont(0).MeasureString("Usable Items") / 2, 1.0f, SpriteEffects.None, 0.5f);
            spriteBatch.DrawString(RAM.GetFont(4), "Equipment", new Vector2(535, 60), Color.White, 0, RAM.GetFont(0).MeasureString("Equipment") / 2, 1.0f, SpriteEffects.None, 0.5f);
            spriteBatch.DrawString(RAM.GetFont(4), "Battle Items", new Vector2(749, 60), Color.White, 0, RAM.GetFont(0).MeasureString("Battle Items") / 2, 1.0f, SpriteEffects.None, 0.5f);
            spriteBatch.DrawString(RAM.GetFont(4), "Synthesizing", new Vector2(963, 60), Color.White, 0, RAM.GetFont(0).MeasureString("Synthesizing") / 2, 1.0f, SpriteEffects.None, 0.5f);
            spriteBatch.DrawString(RAM.GetFont(4), "Story Items", new Vector2(1177, 60), Color.White, 0, RAM.GetFont(0).MeasureString("Story Items") / 2, 1.0f, SpriteEffects.None, 0.5f);
            spriteBatch.Draw(pointer.GetTexture(), pointer.GetPosition(), Color.White);

            //////////////////////////////////////////////////////////////////////////////////

            for (int a = 0; a <= ItemList.Count - 1; a++)
            {
                if (count != MAX_ITEMS_SHOWN)
                {
                    if (a + ItemPassed < ItemList.Count)
                    {
                        spriteBatch.DrawString(RAM.GetFont(3), ItemList[a + ItemPassed].name, new Vector2(248 + (285 * x), 81 + (ITEM_Y_MULTIPLIER * y)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                        if (ItemTypeSelected != 5)
                        {
                            spriteBatch.DrawString(RAM.GetFont(3), ItemList[a + ItemPassed].count.ToString(), new Vector2(418 + (305 * x), 81 + (ITEM_Y_MULTIPLIER * y)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                        }
                    }
                    if (ItemList.Count >= itemnum)
                    {
                        if (ItemType == false)
                        {
                            if (px + py >= 0 && px + py <= ItemList.Count - 1)
                            {
                                spriteBatch.DrawString(RAM.GetFont(1), ItemList[px + py].desc, new Vector2(0, 672), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                                spriteBatch.DrawString(RAM.GetFont(2), ItemList[px + py].name, new Vector2(640, 24), Color.White, 0, RAM.GetFont(2).MeasureString(ItemList[px + py].name) / 2, 1.0f, SpriteEffects.None, 0.5f);
                            }
                        }
                    }
                    x++;
                    count++;
                    if (x == 3)
                    {
                        x = 0;
                        y++;
                    }
                }
            }
            ////////////////////////////////////////////////////////////////////////////////////////////////////
            if (menu is PlayerSelectionMenu)
            {
                ((PlayerSelectionMenu)menu).Draw(spriteBatch);
            }
            ////////////////////////////////////////////////////////////////////////////////////////
        }
Exemple #8
0
        public void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            if (MainMenuFlag == true)
            {
                int tempy = 0;
                int tempx = 0;
                spriteBatch.Draw(background, new Vector2(0, 48), Color.White);
                spriteBatch.Draw(background, new Vector2(1120, 48), Color.White);
                spriteBatch.Draw(background2, new Vector2(0, 672), Color.White);
                spriteBatch.Draw(background2, new Vector2(0, 0), Color.White);
                spriteBatch.Draw(background3, new Vector2(160, 48), Color.White);

                for (int x = 0; x <= RAM.GetPlayerCount(); x++)
                {
                    if ((x % 2) == 1)
                    {
                        spriteBatch.Draw(background4, new Vector2(160 + (480 * tempx), 48 + (156 * tempy)), Color.White);
                        spriteBatch.Draw(Avatar1, new Vector2(160 + (480 * tempx), 48 + (156 * tempy)), Color.White);
                        spriteBatch.DrawString(RAM.GetFont(1), "LV", new Vector2(448 + (480 * tempx), 61 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(1), "HP", new Vector2(256 + (480 * tempx), 89 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(1), "MP", new Vector2(256 + (480 * tempx), 119 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(1), "SP", new Vector2(256 + (480 * tempx), 145 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(1), "Next LV", new Vector2(256 + (480 * tempx), 171 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(1), RAM.GetPlayer(x).name, new Vector2(272 + (480 * tempx), 74 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).name) / 2, 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).Level.ToString(), new Vector2(500 + (480 * tempx), 58 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).HP.ToString() + "/" + RAM.GetPlayer(x).MaxHP.ToString(), new Vector2(448 + (480 * tempx), 100 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).HP.ToString() + "/" + RAM.GetPlayer(x).MaxHP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).MP.ToString() + "/" + RAM.GetPlayer(x).MaxMP.ToString(), new Vector2(448 + (480 * tempx), 126 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).MP.ToString() + "/" + RAM.GetPlayer(x).MaxMP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).SP.ToString() + "/" + RAM.GetPlayer(x).MaxSP.ToString(), new Vector2(448 + (480 * tempx), 152 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).SP.ToString() + "/" + RAM.GetPlayer(x).MaxSP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).EXP.ToString(), new Vector2(448 + (480 * tempx), 168 + (156 * tempy)), Color.White, 0, new Vector2(-100, 0), 1.0f, SpriteEffects.None, 0.5f);
                        tempy++;
                    }
                    else
                    {
                        spriteBatch.Draw(background5, new Vector2(160 + (480 * tempx), 48 + (156 * tempy)), Color.White);
                        spriteBatch.Draw(Avatar1, new Vector2(160 + (480 * tempx), 48 + (156 * tempy)), Color.White);
                        spriteBatch.DrawString(RAM.GetFont(1), "LV", new Vector2(448 + (480 * tempx), 61 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(1), "HP", new Vector2(256 + (480 * tempx), 89 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(1), "MP", new Vector2(256 + (480 * tempx), 119 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(1), "SP", new Vector2(256 + (480 * tempx), 145 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(1), "Next LV", new Vector2(256 + (480 * tempx), 171 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(1), RAM.GetPlayer(x).name, new Vector2(272 + (480 * tempx), 74 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).name) / 2, 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).Level.ToString(), new Vector2(500 + (480 * tempx), 58 + (156 * tempy)), Color.White, 0, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).HP.ToString() + "/" + RAM.GetPlayer(x).MaxHP.ToString(), new Vector2(448 + (480 * tempx), 100 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).HP.ToString() + "/" + RAM.GetPlayer(x).MaxHP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).MP.ToString() + "/" + RAM.GetPlayer(x).MaxMP.ToString(), new Vector2(448 + (480 * tempx), 126 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).MP.ToString() + "/" + RAM.GetPlayer(x).MaxMP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).SP.ToString() + "/" + RAM.GetPlayer(x).MaxSP.ToString(), new Vector2(448 + (480 * tempx), 152 + (156 * tempy)), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.GetPlayer(x).SP.ToString() + "/" + RAM.GetPlayer(x).MaxSP.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
                        spriteBatch.DrawString(RAM.GetFont(0), RAM.GetPlayer(x).EXP.ToString(), new Vector2(448 + (480 * tempx), 168 + (156 * tempy)), Color.White, 0, new Vector2(-100, 0), 1.0f, SpriteEffects.None, 0.5f);
                        tempx++;
                        if (tempx == 2)
                        {
                            tempx = 0;
                        }
                    }
                }
                for (int x = 0; x <= MENUNUMBER - 1; x++)
                {
                    Vector2 FontOrigin = RAM.GetFont(0).MeasureString(MenuItems[x]) / 2;
                    Vector2 FontPos    = new Vector2(80, 100 + (x * 30));
                    spriteBatch.DrawString(RAM.GetFont(0), MenuItems[x], FontPos, Color.White, 0, FontOrigin, 1.0f, SpriteEffects.None, 0.5f);
                    pointer.Draw(spriteBatch);
                }
                int    hours   = gameTime.TotalGameTime.Hours;
                int    minutes = gameTime.TotalGameTime.Minutes;
                int    sec     = gameTime.TotalGameTime.Seconds;
                string time;
                if (hours >= 10)
                {
                    if (minutes >= 10)
                    {
                        if (sec >= 10)
                        {
                            time = hours.ToString() + ":" + minutes.ToString() + ":" + sec.ToString();
                        }
                        else
                        {
                            time = hours.ToString() + ":" + minutes.ToString() + ":0" + sec.ToString();
                        }
                    }
                    else
                    {
                        if (sec >= 10)
                        {
                            time = hours.ToString() + ":" + minutes.ToString() + ":" + sec.ToString();
                        }
                        else
                        {
                            time = hours.ToString() + ":0" + minutes.ToString() + ":0" + sec.ToString();
                        }
                    }
                }
                else
                {
                    if (minutes >= 10)
                    {
                        if (sec >= 10)
                        {
                            time = "0" + hours.ToString() + ":" + minutes.ToString() + ":" + sec.ToString();
                        }
                        else
                        {
                            time = "0" + hours.ToString() + ":0" + minutes.ToString() + ":0" + sec.ToString();
                        }
                    }
                    else
                    {
                        if (sec >= 10)
                        {
                            time = "0" + hours.ToString() + ":0" + minutes.ToString() + ":" + sec.ToString();
                        }
                        else
                        {
                            time = "0" + hours.ToString() + ":0" + minutes.ToString() + ":0" + sec.ToString();
                        }
                    }
                }


                spriteBatch.DrawString(RAM.GetFont(1), "Time", new Vector2(1200, 480), Color.White, 0, RAM.GetFont(0).MeasureString("Time") / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(0), time, new Vector2(1200, 520), Color.White, 0, RAM.GetFont(0).MeasureString(time) / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(1), "Money", new Vector2(1200, 540), Color.White, 0, RAM.GetFont(0).MeasureString("Money") / 2, 1.0f, SpriteEffects.None, 0.5f);
                spriteBatch.DrawString(RAM.GetFont(0), RAM.Money.ToString(), new Vector2(1200, 560), Color.White, 0, RAM.GetFont(0).MeasureString(RAM.Money.ToString()) / 2, 1.0f, SpriteEffects.None, 0.5f);
            }

            if (menu is ItemMenu)
            {
                ((ItemMenu)menu).Draw(spriteBatch);
            }
            else if (menu is SkillsMenu)
            {
                ((SkillsMenu)menu).Draw(spriteBatch);
            }
            else if (menu is EquipmentMenu)
            {
                ((EquipmentMenu)menu).Draw(spriteBatch);
            }
            else if (menu is TacticsMenu)
            {
                ((TacticsMenu)menu).Draw(spriteBatch);
            }
            else if (menu is StatusMenu)
            {
                ((StatusMenu)menu).Draw(spriteBatch);
            }
            else if (menu is SettingsMenu)
            {
                ((SettingsMenu)menu).Draw(spriteBatch);
            }
            else if (menu is FileMenu)
            {
                ((FileMenu)menu).Draw(spriteBatch);
            }
        }