Пример #1
0
        private void setBossPosition()
        {
            int     BossPosition = random.Next(0, graphSize);
            Ambient oAmbient     = vertices[BossPosition].getAmbient();

            oAmbient.setBoss(true);
        }
Пример #2
0
        public virtual int startFight(Ambient ambient)
        {
            hero.setCombo(0);
            createEnemies(ambient);

            while (true)
            {
                if (EnemyList.Count < 1)
                {
                    library.slowWrite("You Win!", Constants.TEXT_SPEED1, true);
                    return(0);
                }
                if (hero.getLife() < 1)
                {
                    library.slowWrite("You Lose!", Constants.TEXT_SPEED1, true);
                    return(1);
                }

                hero.showStatus();
                showEnemies();

                round();
                calculateDamage();
                removeDeads();
            }
        }
Пример #3
0
        private void setHeroPosition()
        {
            int     HeroPosition = 0;
            Ambient oAmbient     = vertices[HeroPosition].getAmbient();

            oAmbient.setHero(oHero);
            vertex = vertices[HeroPosition];
        }
Пример #4
0
        public override void createEnemies(Ambient ambient)
        {
            MonsterFactory oFactory = new MonsterFactory();
            Monster        Enemy;

            Enemy = oFactory.CreateMonster(monsterName, 5);
            Enemy.setID(0);
            EnemyList.Add(Enemy);
        }
Пример #5
0
        public override void createEnemies(Ambient ambient)
        {
            MonsterFactory oFactory = new MonsterFactory();
            Monster        Enemy;
            int            rand = random.Next(5, 8);

            for (int i = 0; i < rand; i++)
            {
                string generatedMonster = ambient.getRandomMonster();

                Enemy = oFactory.CreateMonster(generatedMonster, 1);
                Enemy.setID(i);
                EnemyList.Add(Enemy);
                System.Threading.Thread.Sleep(100);
            }
        }
Пример #6
0
 public void setAmbient(Ambient oAmbient)
 {
     this.oAmbient = oAmbient;
 }
Пример #7
0
 public abstract void createEnemies(Ambient ambient);