Exemplo n.º 1
0
        public void Rencontre(List <Equipe> _EquipeList, List <Personnage> _PersHeroList, List <Personnage> _PersMonstreList)
        {
            do
            {
                List <Personnage> FullList = new List <Personnage>();
                FullList.AddRange(_PersHeroList);
                FullList.AddRange(_PersMonstreList);

                Personnage p1 = getRandomPers(FullList);
                Personnage p2 = getRandomPers(FullList);

                if (_PersMonstreList.Count == 1)
                {
                    p1 = _PersMonstreList[0];
                }

                if (_PersHeroList.Count == 1)
                {
                    p2 = _PersHeroList[0];
                }

                if (p1 is Hero && p2 is Monstre || p1 is Monstre && p2 is Hero)
                {
                    AdversaireMeetEventArgs AdvMeetArgs = new AdversaireMeetEventArgs(p1, p2);
                    onAdversaireMeet(this, AdvMeetArgs);
                }
            } while (_PersHeroList.Count > 0 && _PersMonstreList.Count > 0);

            if (_PersHeroList.Count == 0)
            {
                WinningEventArgrs tWin = new WinningEventArgrs("Monstres");
                onWinning(this, tWin);
            }
            else
            {
                WinningEventArgrs tWin = new WinningEventArgrs("Héros");
                onWinning(this, tWin);
            }
        }
Exemplo n.º 2
0
 public AttackEventArgs(Personnage _attaq, Personnage _def)
 {
     Attaquant = _attaq;
     Defenseur = _def;
 }
Exemplo n.º 3
0
 public void Killed(Personnage p)
 {
     AdversaireKilledEventArgs killArgs = new AdversaireKilledEventArgs(p);
     OnKilling(this, killArgs);
 }
Exemplo n.º 4
0
 public void Attaque(Personnage p)
 {
     AttackEventArgs attackArgs = new AttackEventArgs(this, p);
     OnAttacking(this, attackArgs);
 }
Exemplo n.º 5
0
 public AttackEventArgs(Personnage _attaq, Personnage _def)
 {
     Attaquant = _attaq;
     Defenseur = _def;
 }
 public AdversaireKilledEventArgs(Personnage _advkilled)
 {
     AdvKilled = _advkilled;
 }
Exemplo n.º 7
0
        public void Killed(Personnage p)
        {
            AdversaireKilledEventArgs killArgs = new AdversaireKilledEventArgs(p);

            OnKilling(this, killArgs);
        }
Exemplo n.º 8
0
        public void Attaque(Personnage p)
        {
            AttackEventArgs attackArgs = new AttackEventArgs(this, p);

            OnAttacking(this, attackArgs);
        }
 public AdversaireKilledEventArgs(Personnage _advkilled)
 {
     AdvKilled = _advkilled;
 }
Exemplo n.º 10
0
 public AdversaireMeetEventArgs(Personnage _p1, Personnage _p2)
 {
     p1 = _p1;
     p2 = _p2;
 }
Exemplo n.º 11
0
 public AdversaireMeetEventArgs(Personnage _p1, Personnage _p2)
 {
     p1 = _p1;
     p2 = _p2;
 }