Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            #region Initialisation
            UI ui = new UI();

            Load_Monsters();

            Menu char_menu = new Menu("Character Menu", ui);
            Menu multi_menu = new Menu("Fight other players", ui);
            Menu training_menu = new Menu("Training", ui);
            Menu monster_menu = new Menu("Monster Enciclopedia", ui);
            Menu options_menu = new Menu("Options", ui);

            BattleMenu dungeon_menu = new BattleMenu("Dungeon", "Explore the dungeon", ui);

            Menu main_menu = new Menu("Main Menu", ui);
            main_menu.Items.Add(char_menu);
            main_menu.Items.Add(dungeon_menu);
            main_menu.Items.Add(multi_menu);
            main_menu.Items.Add(training_menu);
            main_menu.Items.Add(monster_menu);
            main_menu.Items.Add(options_menu);

            #endregion
            Load_Chars(char_menu, ui);

            ui.Push_Menu_Stack(main_menu);
        }
Ejemplo n.º 2
0
        static void Load_Chars(Menu _char_menu, UI ui)
        {
            //characters should be loaded from xml and an approprioate character creatation class/method should be implemented and called from the character menu
            Character sprinkles = new Character("Sprinkles");
            DataHandler.Chars.Add(sprinkles);

            foreach(Character c in DataHandler.Chars) {
                MItemData str = new MItemData(c.Strength.ToString(), "Strength", ui);
                MItemData dex = new MItemData(c.Dexterity.ToString(), "Dexterity", ui);
                MItemData con = new MItemData(c.Constitution.ToString(), "Constitution", ui);
                MItemData inte = new MItemData(c.Intelligence.ToString(), "Intelligence", ui);
                MItemData wis = new MItemData(c.Wisdom.ToString(), "Wisdom", ui);
                MItemData chari = new MItemData(c.Charisma.ToString(), "Charisma", ui);
                MItemData hp = new MItemData(c.HP.ToString(), "HP", ui);

                MItemToogle add = new MItemToogle("Add to party", sprinkles, ui);

                Menu character_menu = new Menu(c.Name, ui);

                character_menu.Items.Add(add);
                character_menu.Items.Add(hp);
                character_menu.Items.Add(str);
                character_menu.Items.Add(dex);
                character_menu.Items.Add(con);
                character_menu.Items.Add(inte);
                character_menu.Items.Add(wis);
                character_menu.Items.Add(chari);

                _char_menu.Items.Add(character_menu);
            }
        }
Ejemplo n.º 3
0
        public BattleMenu(string _environment, string _name, UI _ui)
            : base(_name, _ui)
        {
            ui = _ui;

            party = DataHandler.Party;
            Environment = _environment;
            Select_Monsters();
        }
Ejemplo n.º 4
0
 public MenuItem(string _name, UI ui)
     : base(_name)
 {
 }
Ejemplo n.º 5
0
Archivo: Menu.cs Proyecto: tgm-git/cdr
 public Menu(string _name, UI _ui)
     : base(_name)
 {
     ui = _ui;
 }