Пример #1
0
        private async Task RoundStart(HeroSteve steve, Monster monster)
        {
            FateDice dice = new FateDice();

            label8.Hide();

            steve.SetFateDiceNumber(dice.GetFateDiceResult());
            label5.Text = "Score du dé : " + steve.GetFateDiceNumber().ToString();
            monster.SetFateDiceNumber(dice.GetFateDiceResult());
            label6.Text = "Score du dé : " + monster.GetFateDiceNumber().ToString();


            await ShowPictureBox(this.pictureBox2, monster.GetImage());

            this.label2.Text = monster.GetName();
            await Task.Delay(3000);

            if (steve.GetFateDiceNumber() >= monster.GetFateDiceNumber())
            {
                steve.TearApart(monster);
                await ShowPictureBox(this.pictureBox2, deadImgPath);

                richTextBox1.AppendText("Steve Austin a tué " + monster.GetName() + "\r\n");
                pointCount += monster.GetKillPoints();
                killCount++;
                RandomTalk();
            }
            else
            {
                richTextBox1.AppendText("Aille ! Steve austin a raté son attaque !!" + "\r\n");
                monster.Attack(steve, this.richTextBox1, this.label5, this.label6);
            }

            this.label3.Text = steve.getHP().ToString() + " HP";
            this.label4.Text = pointCount + " points";
        }
Пример #2
0
 public HeroSteve()
 {
     this.healthPoints = int.Parse(ConfigurationManager.AppSettings["steveHP"]);
     this.imagePath    = ConfigurationManager.AppSettings["steveIMG"];
     this.fateDice     = new FateDice();
 }