Esempio n. 1
0
        public void Update(GameTime gameTime)
        {
            KeyboardState keyboardState = Keyboard.GetState();

            time += (float)gameTime.ElapsedGameTime.TotalMilliseconds;


            if (keyboardState.IsKeyDown(Keys.Down))
            {
                y++;
            }
            else if (keyboardState.IsKeyDown(Keys.Up))
            {
                y--;
            }
            else if (keyboardState.IsKeyDown(Keys.Enter))
            {
                if (time >= 150)
                {
                    time = 0;
                    if (SelectedItem.name == "potion")
                    {
                        ((Potion)SelectedItem).Effect(RAM.GetPlayer(0));
                        for (int z = 0; z < RAM.MasterItemList.Count; z++)
                        {
                            if ("potion" == RAM.MasterItemList[z].name)
                            {
                                RAM.MasterItemList[z].count -= 1;
                            }
                        }
                    }
                }
            }
            pointer.SetPosition(new Vector2(218 + (x * 285), 84 + (y * 156)));
        }
Esempio n. 2
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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        public void Update(GameTime gametime)
        {
            KeyboardState keyboardState = Keyboard.GetState();

            if (Equipmentmenuflag == true)
            {
                if (keyboardState.IsKeyDown(Keys.Right))
                {
                    if (playerindex >= RAM.PlayerList.Count - 1)
                    {
                        playerindex = 0;
                    }
                    else
                    {
                        playerindex++;
                    }
                }
                else if (keyboardState.IsKeyDown(Keys.Left))
                {
                    if (playerindex <= 0)
                    {
                        playerindex = RAM.PlayerList.Count - 1;
                    }
                    else
                    {
                        playerindex--;
                    }
                }
                if (keyboardState.IsKeyDown(Keys.Down))
                {
                    if (pointerpoint >= equipment.Length - 1)
                    {
                        pointerpoint = 0;
                    }
                    else
                    {
                        pointerpoint++;
                    }
                }
                else if (keyboardState.IsKeyDown(Keys.Up))
                {
                    if (pointerpoint <= 0)
                    {
                        pointerpoint = equipment.Length - 1;
                    }
                    else
                    {
                        pointerpoint--;
                    }
                }
                else if (keyboardState.IsKeyDown(Keys.Enter))
                {
                    Equipmenttype     = pointerpoint;
                    Equipmentmenuflag = false;
                }
                statsnum[0]  = RAM.PlayerList[playerindex].Level;
                statsnum[1]  = RAM.PlayerList[playerindex].MaxHP;
                statsnum[2]  = RAM.PlayerList[playerindex].MaxMP;
                statsnum[3]  = RAM.PlayerList[playerindex].MaxSP;
                statsnum[4]  = RAM.PlayerList[playerindex].ATK;
                statsnum[5]  = RAM.PlayerList[playerindex].DEF;
                statsnum[6]  = RAM.PlayerList[playerindex].INT;
                statsnum[7]  = RAM.PlayerList[playerindex].RES;
                statsnum[8]  = RAM.PlayerList[playerindex].SPD;
                statsnum[9]  = RAM.PlayerList[playerindex].EVD;
                Equipment[0] = RAM.PlayerList[playerindex].Weaponitem;
                Equipment[1] = RAM.PlayerList[playerindex].Helmetitem;
                Equipment[2] = RAM.PlayerList[playerindex].Armoritem;
                Equipment[3] = RAM.PlayerList[playerindex].Bracersitem;
                Equipment[4] = RAM.PlayerList[playerindex].Shielditem;
                Equipment[5] = RAM.PlayerList[playerindex].Greavesitem;
                Equipment[6] = RAM.PlayerList[playerindex].Accessoryitem1;
                Equipment[7] = RAM.PlayerList[playerindex].Accessoryitem2;
                Equipment[8] = RAM.PlayerList[playerindex].Accessoryitem3;
                Equipment[9] = RAM.PlayerList[playerindex].Accessoryitem4;
                pointer.SetPosition(new Vector2(680, 320 + (pointerpoint * 30)));
            }
            else
            {
                if (keyboardState.IsKeyDown(Keys.Down))
                {
                    if (ListPoint >= EquipmentItemList.Count - 1)
                    {
                        ListPoint = 0;
                    }
                    else
                    {
                        ListPoint++;
                    }
                }
                else if (keyboardState.IsKeyDown(Keys.Up))
                {
                    if (ListPoint <= 0)
                    {
                        ListPoint = EquipmentItemList.Count - 1;
                    }
                    else
                    {
                        ListPoint--;
                    }
                }
                else if (keyboardState.IsKeyDown(Keys.Escape))
                {
                    Equipmentmenuflag = true;
                }
                else if (keyboardState.IsKeyDown(Keys.Enter))
                {
                    for (int x = 0; x <= RAM.GetItemListCount(); x++)
                    {
                        if (RAM.PlayerList[playerindex].Weaponitem == RAM.MasterItemList[x])
                        {
                            RAM.MasterItemList.Remove(RAM.MasterItemList[x]);
                        }
                    }
                    if (0 == Equipmenttype)
                    {
                        RAM.MasterItemList.Add(RAM.PlayerList[playerindex].Weaponitem);
                        ((TestPlayer)RAM.GetPlayer(playerindex)).SetEquipment(((WeaponItem)EquipmentItemList[ListPoint]));
                    }
                    else if (1 == Equipmenttype)
                    {
                        RAM.MasterItemList.Add(RAM.PlayerList[playerindex].Helmetitem);
                        ((TestPlayer)RAM.GetPlayer(playerindex)).SetEquipment(((HelmetItem)EquipmentItemList[ListPoint]));
                    }
                    else if (2 == Equipmenttype)
                    {
                        RAM.MasterItemList.Add(RAM.PlayerList[playerindex].Armoritem);
                        ((TestPlayer)RAM.GetPlayer(playerindex)).SetEquipment(((ArmorItem)EquipmentItemList[ListPoint]));
                    }
                    else if (3 == Equipmenttype)
                    {
                        RAM.MasterItemList.Add(RAM.PlayerList[playerindex].Bracersitem);
                        ((TestPlayer)RAM.GetPlayer(playerindex)).SetEquipment(((BracersItem)EquipmentItemList[ListPoint]));
                    }
                    else if (4 == Equipmenttype)
                    {
                        RAM.MasterItemList.Add(RAM.PlayerList[playerindex].Shielditem);
                        ((TestPlayer)RAM.GetPlayer(playerindex)).SetEquipment(((ShieldItem)EquipmentItemList[ListPoint]));
                    }
                    else if (5 == Equipmenttype)
                    {
                        RAM.MasterItemList.Add(RAM.PlayerList[playerindex].Greavesitem);
                        ((TestPlayer)RAM.GetPlayer(playerindex)).SetEquipment(((GreavesItem)EquipmentItemList[ListPoint]));
                    }
                    ListPoint         = 0;
                    Equipmentmenuflag = true;
                }
                // EquipmentItemList = RefeshList(EquipmentItemList);

                if (0 == Equipmenttype)
                {
                    //EquipmentItemList.Add(new WeaponItem());
                }
                else if (1 == Equipmenttype)
                {
                    //EquipmentItemList.Add(new HelmetItem());
                }
                else if (2 == Equipmenttype)
                {
                    //EquipmentItemList.Add(new ArmorItem());
                }
                else if (3 == Equipmenttype)
                {
                    //EquipmentItemList.Add(new BracersItem());
                }
                else if (4 == Equipmenttype)
                {
                    // EquipmentItemList.Add(new ShieldItem());
                }
                else if (5 == Equipmenttype)
                {
                    //EquipmentItemList.Add(new GreavesItem());
                }
                for (int x = 0; x <= RAM.GetItemListCount(); x++)
                {
                    if (2 == RAM.GetItem(x).type) // 2 == Equipment Items
                    {
                        //if (((EquipmentItems)RAM.GetItem(x)).EquipmentType == Equipmenttype)
                        // {
                        //   if (RAM.GetItem(x).count >= 1)
                        //   {
                        //       EquipmentItemList.Add(RAM.MasterItemList[x]);
                        //    }
                        // }
                    }
                }
                pointer.SetPosition(new Vector2(680, 320 + (ListPoint * 30)));
            }
        }
Esempio n. 5
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (Equipmentmenuflag == true)
            {
                for (int x = 0; x <= 8; x++)
                {
                    Vector2 FontOrigin = Font1.MeasureString("fdgsdfgSFDG") / 2;
                    Vector2 FontPos    = new Vector2(100, 320 + (x * 30));
                    spriteBatch.DrawString(Font1, GetText(x), FontPos, Color.Yellow, 0, FontOrigin, 1.0f, SpriteEffects.None, 0.5f);
                    Vector2 FontOrigin2 = Font1.MeasureString("fdgsdfgSFDG") / 2;
                    Vector2 FontPos2    = new Vector2(300, 320 + (x * 30));
                    spriteBatch.DrawString(Font1, GetStatText(x).ToString(), FontPos2, Color.Yellow, 0, FontOrigin2, 1.0f, SpriteEffects.None, 0.5f);
                    Vector2 FontOrigin3 = Font1.MeasureString("fdgsdfgSFDG") / 2;
                    Vector2 FontPos3    = new Vector2(700, 320 + (x * 30));
                    spriteBatch.DrawString(Font1, equipment[x], FontPos3, Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
                    Vector2 FontOrigin4 = Font1.MeasureString("fdgsdfgSFDG") / 2;
                    Vector2 FontPos4    = new Vector2(900, 320 + (x * 30));
                    spriteBatch.DrawString(Font1, Equipment[x].name, FontPos4, Color.Yellow, 0, FontOrigin4, 1.0f, SpriteEffects.None, 0.5f);
                }
            }
            else
            {
                for (int x = 0; x <= 8; x++)
                {
                    Vector2 FontOrigin = Font1.MeasureString("fdgsdfgSFDG") / 2;
                    Vector2 FontPos    = new Vector2(100, 320 + (x * 30));
                    spriteBatch.DrawString(Font1, GetText(x), FontPos, Color.Yellow, 0, FontOrigin, 1.0f, SpriteEffects.None, 0.5f);
                    Vector2 FontOrigin2 = Font1.MeasureString("fdgsdfgSFDG") / 2;
                    Vector2 FontPos2    = new Vector2(300, 320 + (x * 30));
                    spriteBatch.DrawString(Font1, GetStatText(x).ToString(), FontPos2, Color.Yellow, 0, FontOrigin2, 1.0f, SpriteEffects.None, 0.5f);
                }
                spriteBatch.DrawString(Font1, RAM.GetPlayer(playerindex).Weaponitem.name, new Vector2(500, 350), Color.Yellow, 0, Font1.MeasureString(RAM.GetPlayer(playerindex).Weaponitem.name) / 2, 1.0f, SpriteEffects.None, 0.5f);

                /* int MaxHP = RAM.PlayerList[playerindex].MaxHP + ((EquipmentItems)EquipmentItemList[ListPoint]).MaxHP;
                 * int MaxMP = RAM.PlayerList[playerindex].MaxMP + ((EquipmentItems)EquipmentItemList[ListPoint]).MaxMP;
                 * int MaxSP = RAM.PlayerList[playerindex].MaxSP + ((EquipmentItems)EquipmentItemList[ListPoint]).MaxSP;
                 * int HP = RAM.PlayerList[playerindex].HP + ((EquipmentItems)EquipmentItemList[ListPoint]).MaxHP;
                 * int MP = RAM.PlayerList[playerindex].MP + ((EquipmentItems)EquipmentItemList[ListPoint]).MaxMP;
                 * int SP = RAM.PlayerList[playerindex].SP + ((EquipmentItems)EquipmentItemList[ListPoint]).MaxSP;
                 * int ATK = RAM.PlayerList[playerindex].ATK + ((EquipmentItems)EquipmentItemList[ListPoint]).ATK;
                 * int DEF = RAM.PlayerList[playerindex].DEF + ((EquipmentItems)EquipmentItemList[ListPoint]).DEF;
                 * int INT = RAM.PlayerList[playerindex].INT + ((EquipmentItems)EquipmentItemList[ListPoint]).INT;
                 * int RES = RAM.PlayerList[playerindex].RES + ((EquipmentItems)EquipmentItemList[ListPoint]).RES;
                 * int SPD = RAM.PlayerList[playerindex].SPD + ((EquipmentItems)EquipmentItemList[ListPoint]).SPD;
                 * int EVD = RAM.PlayerList[playerindex].EVD + ((EquipmentItems)EquipmentItemList[ListPoint]).EVD;*
                 *
                 * Color Green = Color.Green;
                 * Color Red = Color.Red;
                 * Vector2 FontOrigin3 = Font1.MeasureString("fdgsdfgSFDG") / 2;
                 * spriteBatch.DrawString(Font1, MaxHP.ToString(), new Vector2(500, 350), Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
                 * spriteBatch.DrawString(Font1, MaxMP.ToString(), new Vector2(500, 380), Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
                 * spriteBatch.DrawString(Font1, MaxSP.ToString(), new Vector2(500, 410), Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
                 * // spriteBatch.DrawString(Font1, HP.ToString(), new Vector2(500, 410), Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
                 * //spriteBatch.DrawString(Font1, MP.ToString(), new Vector2(500, 440), Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
                 * //spriteBatch.DrawString(Font1, SP.ToString(), new Vector2(500, 470), Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
                 * if (ATK == (ATK = RAM.PlayerList[playerindex].Stats[(int)stats.kATK] + ((EquipmentItems)EquipmentItemList[ListPoint]).Stats[(int)stats.kATK]) + ((EquipmentItems)EquipmentItemList[ListPoint]).ATK)
                 * {
                 *    spriteBatch.DrawString(Font1, ATK.ToString(), new Vector2(500, 440), Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
                 * }
                 * else if (ATK < (ATK = RAM.PlayerList[playerindex].Stats[(int)stats.kATK] + ((EquipmentItems)EquipmentItemList[ListPoint]).Stats[(int)stats.kATK]) + ((EquipmentItems)EquipmentItemList[ListPoint]).ATK)
                 * {
                 *    spriteBatch.DrawString(Font1, ATK.ToString(), new Vector2(500, 440), Color.Green, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
                 * }
                 * else if (ATK > (ATK = RAM.PlayerList[playerindex].Stats[(int)stats.kATK] + ((EquipmentItems)EquipmentItemList[ListPoint]).Stats[(int)stats.kATK]) + ((EquipmentItems)EquipmentItemList[ListPoint]).ATK)
                 * {
                 *    spriteBatch.DrawString(Font1, ATK.ToString(), new Vector2(500, 440), Color.DarkGreen, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
                 * }*/


                /*spriteBatch.DrawString(Font1, DEF.ToString(), new Vector2(500, 470), Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
                *  spriteBatch.DrawString(Font1, INT.ToString(), new Vector2(500, 500), Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
                *  spriteBatch.DrawString(Font1, RES.ToString(), new Vector2(500, 530), Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
                *  spriteBatch.DrawString(Font1, SPD.ToString(), new Vector2(500, 560), Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
                *  spriteBatch.DrawString(Font1, EVD.ToString(), new Vector2(500, 590), Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);*/
                for (int x = 0; x <= EquipmentItemList.Count - 1; x++)
                {
                    Vector2 FontOrigin4 = Font1.MeasureString("fdgsdfgSFDG") / 2;
                    Vector2 FontPos4    = new Vector2(900, 320 + (x * 30));
                    spriteBatch.DrawString(Font1, EquipmentItemList[x].name, FontPos4, Color.Yellow, 0, FontOrigin4, 1.0f, SpriteEffects.None, 0.5f);
                }
            }
            spriteBatch.Draw(pointer.GetTexture(), pointer.GetPosition(), Color.White);
            //  Vector2 FontOrigin3 = Font1.MeasureString(Players[GetPlayerIndex()].name) / 2;
            // Vector2 FontPos3 = new Vector2(300, 120);
            //  spriteBatch.DrawString(Font1, Players[GetPlayerIndex()].name, FontPos3, Color.Yellow, 0, FontOrigin3, 1.0f, SpriteEffects.None, 0.5f);
        }
Esempio n. 6
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);
            }
        }