Exemple #1
0
        void artficialInteligence_Tick(object sender, EventArgs e)
        {
            CharecterSelector.Player.HealthPoints -= (this.collectionOfEnemies[0].AttackPoints - CharecterSelector.Player.DefencePoints < 0) ?
                                                     0 : (this.collectionOfEnemies[0].AttackPoints - CharecterSelector.Player.DefencePoints);
            MonsterAttack monsterAnimation = new MonsterAttack(new FirstLevelMonster(Image.FromFile("monster.png")));

            monsterAnimation.Show();
            if (CharecterSelector.Player.HealthPoints <= 0)
            {
                UpdateScore(CharecterSelector.Player.Name, CharecterSelector.Player.Score);
                Lose lose = new Lose();
                lose.Show();
                this.Close();
                CharecterSelector.levelSelector.Close();
            }
            artficialInteligence.Stop();
        }
Exemple #2
0
 public void GameLose()
 {
     losepanel.Show();
 }