예제 #1
0
 public static void Init()
 {
     allMagic = FileLineLoader.LoadMagic();
     foreach (Magic m in allMagic)
     {
         magicMap.Add(m.name.ToLower(), m);
     }
 }
예제 #2
0
        private void initStuff()
        {
            //load data from files
            TextureManager.initAll();
            CharacterInfo.allInfos = FileLineLoader.LoadCharInfos();
            Equip.allWeapons       = FileLineLoader.LoadWeapons();
            Equip.allArmors        = FileLineLoader.LoadArmors();
            Magic.Init();

            //character selection
            control.bind(charSel);
            charSel.control = control;
            charSel.bindHadlers();

            //shop
            Shop.shop.selection = charSel;
            control.bind(Shop.shop);

            //equip selection
            control.bind(equipSel);
            equipSel.control = control;
            equipSel.init();

            //bind character and equip
            charSel.characterChangedEvent += new CharacterSelection.CharacterChanged(equipSel.setCharacter);

            //play button
            control.getPlayButton().Click += new EventHandler(playPressed);

            //monster infos
            MonsterInfo.allMonsterInfos = FileLineLoader.LoadMonstersInfos();

            //drawing panels
            DisplayPanel.Init();
            RowPanel.Init();
        }