예제 #1
0
        public static BossEnemy GetRandomBoss(int powerLevel)
        {
            BossEnemy enemy = null;
            Random    gen   = new Random();
            int       rand  = gen.Next(0, 3);

            switch (rand)
            {
            case (0):
                enemy = new VampBoss();
                enemy.BuildBoss(powerLevel);
                break;

            case (1):
                enemy = new ChargeBoss();
                enemy.BuildBoss(powerLevel);
                break;

            case (2):
                enemy = new RangerBoss();
                enemy.BuildBoss(powerLevel);
                break;
            }

            return(enemy);
        }
예제 #2
0
        public static BossEnemy GetRandomBoss(int powerLevel)
        {
            BossEnemy enemy = null;
            Random gen = new Random();
            int rand = gen.Next(0, 3);

            switch (rand)
            {
                case (0):
                    enemy = new VampBoss();
                    enemy.BuildBoss(powerLevel);
                    break;
                case (1):
                    enemy = new ChargeBoss();
                    enemy.BuildBoss(powerLevel);
                    break;
                case (2):
                    enemy = new RangerBoss();
                    enemy.BuildBoss(powerLevel);
                    break;
            }

            return enemy;
        }