コード例 #1
0
ファイル: EnemyCreator.cs プロジェクト: JonECG/Brogue
        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
ファイル: EnemyCreator.cs プロジェクト: JonECG/Brogue
        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;
        }