コード例 #1
0
ファイル: Boss.cs プロジェクト: bmjoy/ShootingBeats
            private IEnumerator PatternE_2()
            {
                const int shooterCount = 4;
                const int cycle = 620;
                SpiralPlacedShooterBullet[] bs = new SpiralPlacedShooterBullet[shooterCount];
                for (int i = 0; i < shooterCount; ++i)
                {
                    bool isBlue = (i % 2 == 0);
                    string shape = (isBlue) ? "Common/Bullet_BlueLarge" : "Common/Bullet_RedLarge";
                    string bulletShape = (isBlue) ? "Common/Bullet_BlueSmall" : "Common/Bullet_RedSmall";
                    float orbitAngle = ((float)1 / (float)shooterCount / 2.0f) + ((float)i / (float)shooterCount);
                    float orbitAngleRate = 0.002f;
                    float orbitRadius = (isBlue) ? 0.9f : 0.8f;
                    int shotTime = (isBlue) ? 20 : 25;
                    int waitTime = (isBlue) ? 40 : 35;
                    float bulletSpeed = (isBlue) ? 0.01f : 0.008f;

                    bs[i] = GameSystem._Instance.CreateBullet<SpiralPlacedShooterBullet>();
                    bs[i].Init(shape, orbitAngle, orbitAngleRate, orbitRadius
                        , shotTime, waitTime, 4, 700
                        , bulletShape, bulletSpeed, 6);
                }

                // 사이클 후 슈터 삭제
                yield return new WaitForFrames(cycle - 1);
                for (int i = 0; i < shooterCount; ++i)
                {
                    bs[i]._alive = false;
                }
            }
コード例 #2
0
ファイル: Boss.cs プロジェクト: bmjoy/ShootingBeats
            private IEnumerator PatternE_1()
            {
                const int shooterCount = 2;
                const int cycle = 700;
                SpiralPlacedShooterBullet[] bs = new SpiralPlacedShooterBullet[shooterCount];
                for (int i = 0; i < shooterCount; ++i)
                {
                    string shape = (i % 2 == 0) ? "Common/Bullet_BlueLarge" : "Common/Bullet_RedLarge";
                    string bulletShape = (i % 2 == 0) ? "Common/Bullet_BlueSmall" : "Common/Bullet_RedSmall";
                    float orbitAngle = 1.0f * ((float)i / (float)shooterCount);

                    bs[i] = GameSystem._Instance.CreateBullet<SpiralPlacedShooterBullet>();
                    bs[i].Init(shape, orbitAngle, 0.002f, 0.9f
                        , 30, 30, 3, cycle
                        , bulletShape, 0.01f, 8);
                }

                // 사이클 후 슈터 삭제
                yield return new WaitForFrames(cycle - 1);
                for (int i = 0; i < shooterCount; ++i)
                {
                    bs[i]._alive = false;
                }
            }