public override void Ctrl() { base.Ctrl(); if (this.Time % 4 == 0) { int num1 = 20; float num2 = 2f; for (int index = 0; index < num1; ++index) { ParticleColored particleColored = new ParticleColored(this.StageData, "光点", new PointF(this.Position.X - (float)num1 + (float)(2 * index), this.Position.Y - 20f), 20f, -1.0 * Math.PI / 2.0 - (double)num2 / 2.0 + (double)index / (double)num1 * (double)num2); } } if ((double)this.MyPlane.Position.Y >= (double)this.BoundRect.Bottom) { return; } BaseMyPlane myPlane = this.MyPlane; PointF position = this.MyPlane.Position; double x = (double)position.X; position = this.MyPlane.Position; double num = (double)position.Y + 2.0; PointF pointF = new PointF((float)x, (float)num); myPlane.Position = pointF; }
public override void ProcessZ() { if (!(((DescriptionMenuItem)MenuItemList[MenuSelectIndex]).Description != "----------")) { return; } StageData.SoundPlay("se_ok00.wav"); string fileName = ".\\Replay\\thSSS_" + RepIndex + ".rpy"; StageData.Rep.LoadRpy(fileName); ReplayInfo replayInfo = Replay.ReadTitle(fileName); StageData.RepInfo = replayInfo; int num; string str; if (MenuSelectIndex < 6) { if (replayInfo.StartStage.Contains("St")) { num = MenuSelectIndex + 1; str = "St" + num.ToString(); } else { num = MenuSelectIndex + 1; str = "Bs" + num.ToString(); } } else { str = "StEx"; } StageData.StateSwitchData = new StateSwitchDataPackage() { NextState = str, NeedInit = true, SDPswitch = new StageDataPackage(StageData.GlobalData) { OnReplay = true, Difficulty = replayInfo.Rank } }; int index = !(str == "StEx") ? (!replayInfo.StartStage.Contains("St") ? MenuSelectIndex - Convert.ToInt32(replayInfo.StartStage.Replace("Bs", "")) + 1 : MenuSelectIndex - Convert.ToInt32(replayInfo.StartStage.Replace("St", "")) + 1) : 0; Point point = new Point(192, 398); if (index >= 0) { point = new Point((int)replayInfo.MyPlaneData[index].PosX, (int)replayInfo.MyPlaneData[index].PosY); } BaseMyPlane baseMyPlane; switch (replayInfo.MyPlaneName) { case "Reimu": baseMyPlane = new MyPlane_Reimu(StageData.StateSwitchData.SDPswitch, point); break; case "Sanae": baseMyPlane = new MyPlane_Sanae(StageData.StateSwitchData.SDPswitch, point); break; case "Marisa": baseMyPlane = new MyPlane_Marisa(StageData.StateSwitchData.SDPswitch, point); break; case "Koishi": baseMyPlane = new MyPlane_Koishi(StageData.StateSwitchData.SDPswitch, point); break; default: baseMyPlane = new BaseMyPlane(StageData.StateSwitchData.SDPswitch, point); break; } if (index >= 0) { baseMyPlane.Life = replayInfo.MyPlaneData[index].Life; baseMyPlane.Spell = replayInfo.MyPlaneData[index].Spell; baseMyPlane.Power = replayInfo.MyPlaneData[index].Power; baseMyPlane.Score = replayInfo.MyPlaneData[index].Score; baseMyPlane.OriginalPosition = new PointF(replayInfo.MyPlaneData[index].PosX, replayInfo.MyPlaneData[index].PosY); baseMyPlane.Graze = replayInfo.MyPlaneData[index].Graze; baseMyPlane.LifeUpCount = replayInfo.MyPlaneData[index].LifeUpCount; baseMyPlane.LifeChip = replayInfo.MyPlaneData[index].LifeChip; baseMyPlane.SpellChip = replayInfo.MyPlaneData[index].SpellChip; baseMyPlane.StarPoint = replayInfo.MyPlaneData[index].StarPoint; baseMyPlane.HighItemScore = replayInfo.MyPlaneData[index].HighItemScore; baseMyPlane.Rate = replayInfo.MyPlaneData[index].Rate; baseMyPlane.LastColor = replayInfo.MyPlaneData[index].LastColor; StageData.Rep.DataPosition = replayInfo.MyPlaneData[index].DataPosition; } StageData.StateSwitchData.SDPswitch.MyPlane = baseMyPlane; StageData.StateSwitchData.SDPswitch.RepInfo = replayInfo; }
public override void ProcessZ() { switch (this.MenuItemList[this.MenuSelectIndex].Name) { case "Menu_继续游戏": this.StageData.StateSwitchData = new StateSwitchDataPackage() { NextState = this.StageData.GlobalData.LastState.StageName, NeedInit = false }; ((BaseGameState)this.StageData.GlobalData.LastState).TimeSycn(); break; case "Menu_再试一次": if (this.StageData.GlobalData.LastState == null) { break; } ++this.StageData.GlobalData.LastState.StageData.ContinueTimes; this.StageData.GlobalData.LastState.StageData.MyPlane.RetryClear(); this.StageData.StateSwitchData = new StateSwitchDataPackage() { NextState = this.StageData.GlobalData.LastState.StageName, NeedInit = false }; this.StageData.Rep.Dispose(); this.StageData.Rep.CreatRpy(); break; case "Menu_保存录像": this.StageData.MenuGroupList.Add((BaseMenuGroup) new MenuGroup_ReplaySaver(this.StageData, new PointF(36f, 16f))); break; case "Menu_从头开始": if (this.StageData.GlobalData.LastState == null) { break; } bool onReplay = this.StageData.GlobalData.LastState.StageData.OnReplay; bool onPractice = this.StageData.GlobalData.LastState.StageData.OnPractice; ReplayInfo repInfo = this.StageData.GlobalData.LastState.StageData.RepInfo; this.StageData.StateSwitchData = new StateSwitchDataPackage() { NextState = this.StageData.GlobalData.LastState.StageData.RepInfo.StartStage, NeedInit = true, SDPswitch = new StageDataPackage(this.StageData.GlobalData) { Difficulty = repInfo.Rank, OnReplay = onReplay } }; int index = 0; Point point = new Point(192, 398); if (index >= 0) { point = new Point((int)repInfo.MyPlaneData[index].PosX, (int)repInfo.MyPlaneData[index].PosY); } BaseMyPlane baseMyPlane; switch (repInfo.MyPlaneName) { case "Aya": switch (repInfo.WeaponType) { case "A": baseMyPlane = (BaseMyPlane) new MyPlane_Aya(this.StageData.StateSwitchData.SDPswitch, point); break; case "B": baseMyPlane = (BaseMyPlane) new MyPlane_AyaB(this.StageData.StateSwitchData.SDPswitch, point); break; default: baseMyPlane = (BaseMyPlane) new MyPlane_Aya(this.StageData.StateSwitchData.SDPswitch, point); break; } break; case "Plane": switch (repInfo.WeaponType) { case "A": baseMyPlane = (BaseMyPlane) new AutoPlane(this.StageData.StateSwitchData.SDPswitch, point); break; case "B": baseMyPlane = (BaseMyPlane) new MyPlane_PlaneB(this.StageData.StateSwitchData.SDPswitch, point); break; default: baseMyPlane = new BaseMyPlane(this.StageData.StateSwitchData.SDPswitch, point); break; } break; case "Reimu": baseMyPlane = (BaseMyPlane) new MyPlane_Reimu(this.StageData.StateSwitchData.SDPswitch, point); break; case "Sanae": baseMyPlane = (BaseMyPlane) new MyPlane_Sanae(this.StageData.StateSwitchData.SDPswitch, point); break; case "Marisa": baseMyPlane = (BaseMyPlane) new MyPlane_Marisa(this.StageData.StateSwitchData.SDPswitch, point); break; case "Koishi": baseMyPlane = (BaseMyPlane) new MyPlane_Koishi(this.StageData.StateSwitchData.SDPswitch, point); break; default: baseMyPlane = (BaseMyPlane) new MyPlane_Aya(this.StageData.StateSwitchData.SDPswitch, point); break; } if (index >= 0) { // baseMyPlane.LifeUpCount=SourseForm.lifeUpCount; // baseMyPlane.Life=SourseForm.life; // baseMyPlane.LifeChip=SourseForm.lifeChip; // baseMyPlane.Spell=SourseForm.spell; // baseMyPlane.SpellChip=SourseForm.spellChip; // baseMyPlane.Power=SourseForm.power; // baseMyPlane.HighItemScore=SourseForm.highItemScore; // baseMyPlane.StarPoint=SourseForm.starPoint; // baseMyPlane.LastColor=SourseForm.starColor; // baseMyPlane.Score=SourseForm.score; baseMyPlane.Life = repInfo.MyPlaneData[index].Life; baseMyPlane.Spell = repInfo.MyPlaneData[index].Spell; baseMyPlane.Power = repInfo.MyPlaneData[index].Power; baseMyPlane.Score = repInfo.MyPlaneData[index].Score; baseMyPlane.OriginalPosition = new PointF(repInfo.MyPlaneData[index].PosX, repInfo.MyPlaneData[index].PosY); this.StageData.Rep.DataPosition = repInfo.MyPlaneData[index].DataPosition; } this.StageData.StateSwitchData.SDPswitch.MyPlane = baseMyPlane; this.StageData.StateSwitchData.SDPswitch.OnPractice = onPractice; if (!onReplay) { this.StageData.Rep.Dispose(); this.StageData.Rep.CreatRpy(); } else { this.StageData.Rep.DataPosition = 0L; } if (!onReplay) { this.StageData.StateSwitchData.SDPswitch.SetReplayInfo(this.StageData.StateSwitchData.NextState); } else { this.StageData.StateSwitchData.SDPswitch.RepInfo = repInfo; } break; case "Menu_返回主菜单": this.StageData.StateSwitchData = new StateSwitchDataPackage() { NextState = "MainMenu", NeedInit = true, SDPswitch = new StageDataPackage(this.StageData.GlobalData) }; this.StageData.Rep.CloseRpy(); break; } }