Exemple #1
0
        public void EndFightPvP(Hero h1, Hero h2)
        {
            Console.WriteLine("---------------------------------------------------------------");
            Console.WriteLine("{0} meurt dans d'atroces souffrances!", h2.Name);
            Console.WriteLine("{0} est le gagnant du duel!", h1.Name);
            int xpWin = (h2.Lvl * 100);

            Console.WriteLine("{0} gagne {1} xp!", h1.Name, xpWin);
            h1.GainXP(xpWin);
            ListHeroes.Remove(h2);
            SaveClass.DelHero(h2.Name, this.Name, ListHeroes);
        }
Exemple #2
0
        //---

        public void DelCharacter(int i)
        {
            int timer = 0;

            foreach (Hero H in ListHeroes)
            {
                if (i == timer)
                {
                    string nameHero = ListHeroes[timer].Name;
                    ListHeroes.RemoveAt(timer);
                    SaveClass.DelHero(nameHero, this.Name, ListHeroes);
                    break;
                }
                timer++;
            }
        }