Пример #1
0
        public BaseEmitter_CS(StageDataPackage StageData, CS_Data CSData, EmitterMode EmitterMode)
        {
            this.StageData      = StageData;
            this.CSData         = CSData;
            EventGroupList      = new List <EventGroup>();
            EventsExecutionList = new List <Execution>();
            HealthPoint         = 1000000f;
            HitEnabled          = false;
            Region           = 0;
            Count            = 1;
            this.EmitterMode = EmitterMode;
            switch (EmitterMode)
            {
            case EmitterMode.Bullet:
                CSBullet = new BaseBullet_CS(StageData);
                break;

            case EmitterMode.StraightLaser:
                CSLaserS = new BaseStraightLaser_CS(StageData);
                break;

            case EmitterMode.RadialLaser:
                CSLaserR = new BaseRadialLaser_CS(StageData);
                break;

            case EmitterMode.BendLaser:
                CSLaserB = new BaseBendLaser_CS(StageData);
                break;

            case EmitterMode.Effect:
                CSEffect = new BaseEffect_CS(StageData);
                break;
            }
        }
Пример #2
0
        public CS_Data LoadCS(string FileName)
        {
            if (this.CS_Cathe.ContainsKey(FileName))
            {
                return(this.CS_Cathe[FileName]);
            }
            CS_Data csData = new CS_Data(FileName);

            csData.String2Data(this);
            return(csData);
        }
Пример #3
0
 public void PreLoadCS(string Path)
 {
     foreach (string file in Directory.GetFiles(Path, "*.mbg"))
     {
         FileInfo fileInfo = new FileInfo(file);
         CS_Data  csData   = new CS_Data(file);
         csData.String2Data(this);
         this.CS_Cathe.Add(file, csData);
     }
     foreach (string directory in Directory.GetDirectories(Path))
     {
         this.PreLoadCS(directory);
     }
 }
Пример #4
0
 public CSEmitterController(StageDataPackage StageData, CS_Data CSData)
     : base(StageData)
 {
     this.CSData = CSData;
     this.BaseOriginalPosition = new PointF((float)(this.BoundRect.Width / 2), 130f);
 }
Пример #5
0
        public override void Drama()
        {
            base.Drama();
            int[] numArray = new int[3] {
                3180, 4000, 6440
            };
            if (TimeMain == 1)
            {
                switch (StageData.Difficulty)
                {
                case DifficultLevel.Hard:
                    MyPlane.EnchantmentCountNeeded = 3;
                    break;

                case DifficultLevel.Lunatic:
                    MyPlane.EnchantmentCountNeeded = 4;
                    break;
                }
                TransitionIn transitionIn = new TransitionIn(StageData);
            }
            if (TimeMain == 2)
            {
                if (StageData.C_History.PracticeLevel < 1)
                {
                    StageData.C_History.PracticeLevel = 1;
                }
                StageData.ChangeBGM(".\\BGM\\Stage01.wav", (testStartTime + 60) * 44100 / 60, 0, 0, 0, 0);
                Point      DestPoint   = new Point(BoundRect.Width, BoundRect.Height - 16);
                MusicTitle musicTitle1 = new MusicTitle(StageData, "宁静夏夜的微风", DestPoint);
                MusicTitle musicTitle2 = musicTitle1;
                PointF     pointF      = new PointF(BoundRect.Width, BoundRect.Height + 100);
                musicTitle2.OriginalPosition = pointF;
                musicTitle1.Scale            = 0.5f;
                Background3D.Envi            = new EnvironmentSSS01(StageData);
                new BackgroundTransitionIn(StageData)
                {
                    Delay = 200
                }.LifeTime = 320;
                BackgroundGroupSSS01 backgroundGroupSsS01 = new BackgroundGroupSSS01(StageData);
                if (testStartTime > TimeMain)
                {
                    TimeMain = testStartTime;
                }
                if (TimeMain < numArray[0])
                {
                    string[] files;
                    switch (StageData.Difficulty)
                    {
                    case DifficultLevel.Easy: files = Directory.GetFiles(".\\CS\\St01\\A\\E\\", "*.mbg"); break;

                    case DifficultLevel.Normal: files = Directory.GetFiles(".\\CS\\St01\\A\\N\\", "*.mbg"); break;

                    case DifficultLevel.Hard: files = Directory.GetFiles(".\\CS\\St01\\A\\H\\", "*.mbg"); break;

                    case DifficultLevel.Lunatic: files = Directory.GetFiles(".\\CS\\St01\\A\\L\\", "*.mbg"); break;

                    default: files = Directory.GetFiles(".\\CS\\St01\\A\\L\\", "*.mbg"); break;
                    }
                    foreach (string FileName in files)
                    {
                        new CSEmitterController(StageData, StageData.LoadCS(FileName))
                        {
                            OnRoad = true
                        }.Time = TimeMain + 60;
                    }
                }
                PointF Position = new PointF(BoundRect.X + BoundRect.Width / 2, BoundRect.Y + 16);
                new TextTwinkle(StageData, StageData.Difficulty.ToString(), Position, 0.0f, Math.PI / 2.0)
                {
                    TwinkleColor = Color.Gray, Circle = 10
                }.LifeTime = 150;
            }
            else if (TimeMain == 30)
            {
                new TextTwinkle(StageData, "ItemGetBorderLine", new PointF(BoundRect.X + BoundRect.Width / 2, BoundRect.Y + 130), 0.0f, Math.PI / 2.0).TwinkleColor         = Color.OrangeRed;
                new TextTwinkle(StageData, "ItemGetBorderLine01", new PointF(BoundRect.X + BoundRect.Width / 2 - 168, BoundRect.Y + 130), 0.0f, Math.PI / 2.0).TwinkleColor = Color.OrangeRed;
                new TextTwinkle(StageData, "ItemGetBorderLine01", new PointF(BoundRect.X + BoundRect.Width / 2 + 158, BoundRect.Y + 130), 0.0f, Math.PI / 2.0).TwinkleColor = Color.OrangeRed;
            }
            if (TimeMain == numArray[0])
            {
                StageData.RemoveBullets();
                Boss_Ami01      bossAmi01       = new Boss_Ami01(StageData);
                EmitterBossFire emitterBossFire = new EmitterBossFire(StageData, Boss.OriginalPosition, Color.FromArgb(40, byte.MaxValue, 20));
                new MagicCircle(StageData, "MagicCircleSix").Scale = 1.5f;
                Background3D.WarpEnabled  = true;
                Background3D.WarpColorKey = 0;
            }
            else if (TimeMain > numArray[1] && Boss == null && !RoadFlag)
            {
                RoadFlag = true;
                string[] files;
                switch (StageData.Difficulty)
                {
                case DifficultLevel.Easy:
                    files = Directory.GetFiles(".\\CS\\St01\\B\\E\\", "*.mbg");
                    break;

                case DifficultLevel.Normal:
                    files = Directory.GetFiles(".\\CS\\St01\\B\\N\\", "*.mbg");
                    break;

                case DifficultLevel.Hard:
                    files = Directory.GetFiles(".\\CS\\St01\\B\\H\\", "*.mbg");
                    break;

                case DifficultLevel.Lunatic:
                    files = Directory.GetFiles(".\\CS\\St01\\B\\L\\", "*.mbg");
                    break;

                default:
                    files = Directory.GetFiles(".\\CS\\St01\\B\\L\\", "*.mbg");
                    break;
                }
                foreach (string FileName in files)
                {
                    CS_Data CSData = new CS_Data(FileName);
                    CSData.String2Data(StageData);
                    new CSEmitterController(StageData, CSData)
                    {
                        OnRoad = true
                    }.Time = TimeMain + 60;
                }
            }
            else if (numArray[2] - 130 == TimeMain)
            {
                PointF OriginalPosition = new PointF(BoundRect.Width / 2, 150f);
                new BossStar(StageData, OriginalPosition).ColorType = 6;
            }
            else
            {
                if (numArray[2] != TimeMain)
                {
                    return;
                }
                StageData.RemoveBullets();
                Boss_Ami02 bossAmi02 = new Boss_Ami02(StageData);
                switch (MyPlane.Name)
                {
                case "Aya":
                    Story_SSS01_01 storySsS0101 = new Story_SSS01_01(StageData);
                    break;

                case "Reimu":
                    Story_SSS01_01A storySsS0101A = new Story_SSS01_01A(StageData);
                    break;

                case "Marisa":
                    Story_SSS01_01B storySsS0101B = new Story_SSS01_01B(StageData);
                    break;

                case "Sanae":
                    Story_SSS01_01C storySsS0101C = new Story_SSS01_01C(StageData);
                    break;

                case "Koishi":
                    Story_SSS01_01D storySsS0101D = new Story_SSS01_01D(StageData);
                    break;

                default:
                    Story_SSS01_01X storySsS0101X = new Story_SSS01_01X(StageData);
                    break;
                }
                Background3D.WarpEnabled  = false;
                Background3D.WarpColorKey = 0;
            }
        }
Пример #6
0
        public override void Drama()
        {
            base.Drama();
            int[] numArray = new int[3] {
                3180, 4000, 6440
            };
            if (this.TimeMain == 1)
            {
                switch (this.StageData.Difficulty)
                {
                case DifficultLevel.Hard:
                    this.MyPlane.EnchantmentCountNeeded = 3;
                    break;

                case DifficultLevel.Lunatic:
                    this.MyPlane.EnchantmentCountNeeded = 4;
                    break;
                }
                TransitionIn transitionIn = new TransitionIn(this.StageData);
            }
            Rectangle boundRect;

            if (this.TimeMain == 2)
            {
                if (this.StageData.C_History.PracticeLevel < 1)
                {
                    this.StageData.C_History.PracticeLevel = 1;
                }
                this.StageData.ChangeBGM(".\\BGM\\Stage01.wav", (this.testStartTime + 60) * 44100 / 60, 0, 0, 0, 0);
                StageDataPackage stageData1 = this.StageData;
                boundRect = this.BoundRect;
                int width1 = boundRect.Width;
                boundRect = this.BoundRect;
                int        y           = boundRect.Height - 16;
                Point      DestPoint   = new Point(width1, y);
                MusicTitle musicTitle1 = new MusicTitle(stageData1, "宁静夏夜的微风", DestPoint);
                MusicTitle musicTitle2 = musicTitle1;
                boundRect = this.BoundRect;
                double width2 = (double)boundRect.Width;
                boundRect = this.BoundRect;
                double num1   = (double)(boundRect.Height + 100);
                PointF pointF = new PointF((float)width2, (float)num1);
                musicTitle2.OriginalPosition = pointF;
                musicTitle1.Scale            = 0.5f;
                this.Background3D.Envi       = (IEnvironment) new EnvironmentSSS01(this.StageData);
                new BackgroundTransitionIn(this.StageData)
                {
                    Delay = 200
                }.LifeTime = 320;
                BackgroundGroupSSS01 backgroundGroupSsS01 = new BackgroundGroupSSS01(this.StageData);
                if (this.testStartTime > this.TimeMain)
                {
                    this.TimeMain = this.testStartTime;
                }
                if (this.TimeMain < numArray[0])
                {
                    string[] files;
                    switch (this.StageData.Difficulty)
                    {
                    case DifficultLevel.Easy:
                        files = Directory.GetFiles(".\\CS\\St01\\A\\E\\", "*.mbg");
                        break;

                    case DifficultLevel.Normal:
                        files = Directory.GetFiles(".\\CS\\St01\\A\\N\\", "*.mbg");
                        break;

                    case DifficultLevel.Hard:
                        files = Directory.GetFiles(".\\CS\\St01\\A\\H\\", "*.mbg");
                        break;

                    case DifficultLevel.Lunatic:
                        files = Directory.GetFiles(".\\CS\\St01\\A\\L\\", "*.mbg");
                        break;

                    default:
                        files = Directory.GetFiles(".\\CS\\St01\\A\\L\\", "*.mbg");
                        break;
                    }
                    foreach (string FileName in files)
                    {
                        CSEmitterController csec = new CSEmitterController(StageData, StageData.LoadCS(FileName));
                        csec.OnRoad = true;
                        csec.Time   = TimeMain + 60;
                    }
                    //  new CSEmitterController(this.StageData, this.StageData.LoadCS(FileName))
                    //   {
                    //     OnRoad = true
                    //   }.Time = this.TimeMain + 60;
                }
                StageDataPackage stageData2  = this.StageData;
                string           textureName = this.StageData.Difficulty.ToString();
                boundRect = this.BoundRect;
                int x = boundRect.X;
                boundRect = this.BoundRect;
                int    num2 = boundRect.Width / 2;
                double num3 = (double)(x + num2);
                boundRect = this.BoundRect;
                double num4     = (double)(boundRect.Y + 16);
                PointF Position = new PointF((float)num3, (float)num4);
                new TextTwinkle(stageData2, textureName, Position, 0.0f, Math.PI / 2.0)
                {
                    TwinkleColor = Color.Gray,
                    Circle       = 10
                }.LifeTime = 150;
            }
            else if (this.TimeMain == 30)
            {
                new TextTwinkle(this.StageData, "ItemGetBorderLine", new PointF((float)(this.BoundRect.X + this.BoundRect.Width / 2), (float)(this.BoundRect.Y + 130)), 0.0f, Math.PI / 2.0).TwinkleColor         = Color.OrangeRed;
                new TextTwinkle(this.StageData, "ItemGetBorderLine01", new PointF((float)(this.BoundRect.X + this.BoundRect.Width / 2 - 168), (float)(this.BoundRect.Y + 130)), 0.0f, Math.PI / 2.0).TwinkleColor = Color.OrangeRed;
                new TextTwinkle(this.StageData, "ItemGetBorderLine01", new PointF((float)(this.BoundRect.X + this.BoundRect.Width / 2 + 158), (float)(this.BoundRect.Y + 130)), 0.0f, Math.PI / 2.0).TwinkleColor = Color.OrangeRed;
            }
            if (this.TimeMain == numArray[0])
            {
                this.StageData.RemoveBullets();
                Boss_Ami01      bossAmi01       = new Boss_Ami01(this.StageData);
                EmitterBossFire emitterBossFire = new EmitterBossFire(this.StageData, this.Boss.OriginalPosition, Color.FromArgb(40, (int)byte.MaxValue, 20));
                new MagicCircle(this.StageData, "MagicCircleSix").Scale = 1.5f;
                this.Background3D.WarpEnabled  = true;
                this.Background3D.WarpColorKey = 0;
            }
            else if (this.TimeMain > numArray[1] && this.Boss == null && !this.RoadFlag)
            {
                this.RoadFlag = true;
                string[] files;
                switch (this.StageData.Difficulty)
                {
                case DifficultLevel.Easy:
                    files = Directory.GetFiles(".\\CS\\St01\\B\\E\\", "*.mbg");
                    break;

                case DifficultLevel.Normal:
                    files = Directory.GetFiles(".\\CS\\St01\\B\\N\\", "*.mbg");
                    break;

                case DifficultLevel.Hard:
                    files = Directory.GetFiles(".\\CS\\St01\\B\\H\\", "*.mbg");
                    break;

                case DifficultLevel.Lunatic:
                    files = Directory.GetFiles(".\\CS\\St01\\B\\L\\", "*.mbg");
                    break;

                default:
                    files = Directory.GetFiles(".\\CS\\St01\\B\\L\\", "*.mbg");
                    break;
                }
                foreach (string FileName in files)
                {
                    CS_Data CSData = new CS_Data(FileName);
                    CSData.String2Data(this.StageData);
                    new CSEmitterController(this.StageData, CSData)
                    {
                        OnRoad = true
                    }.Time = this.TimeMain + 60;
                }
            }
            else if (numArray[2] - 130 == this.TimeMain)
            {
                StageDataPackage stageData = this.StageData;
                boundRect = this.BoundRect;
                PointF OriginalPosition = new PointF((float)(boundRect.Width / 2), 150f);
                new BossStar(stageData, OriginalPosition).ColorType = 6;
            }
            else
            {
                if (numArray[2] != this.TimeMain)
                {
                    return;
                }
                this.StageData.RemoveBullets();
                Boss_Ami02 bossAmi02 = new Boss_Ami02(this.StageData);
                switch (this.MyPlane.Name)
                {
                case "Aya":
                    Story_SSS01_01 storySsS0101 = new Story_SSS01_01(this.StageData);
                    break;

                case "Reimu":
                    Story_SSS01_01A storySsS0101A = new Story_SSS01_01A(this.StageData);
                    break;

                case "Marisa":
                    Story_SSS01_01B storySsS0101B = new Story_SSS01_01B(this.StageData);
                    break;

                case "Sanae":
                    Story_SSS01_01C storySsS0101C = new Story_SSS01_01C(this.StageData);
                    break;

                case "Koishi":
                    Story_SSS01_01D storySsS0101D = new Story_SSS01_01D(this.StageData);
                    break;

                default:
                    Story_SSS01_01X storySsS0101X = new Story_SSS01_01X(this.StageData);
                    break;
                }
                this.Background3D.WarpEnabled  = false;
                this.Background3D.WarpColorKey = 0;
            }
        }