public override void Ctrl() { base.Ctrl(); if (this.Time == 98) { this.Boss.GiveItems(); BaseParticle3D baseParticle3D = new BaseParticle3D(this.StageData, "夜空(亮)", new PointF((float)(this.BoundRect.Width / 2), (float)(this.BoundRect.Height / 2)), 0.0f, Math.PI / 2.0); baseParticle3D.Depth = -10f; baseParticle3D.TransparentVelocity = 10f; baseParticle3D.TransparentValueF = 0.0f; this.Background3D.BackgroundParticleList.Add(baseParticle3D); } if (this.Time != this.LifeTime) { return; } if (this.Boss is Boss_Tensei02 && (double)this.Boss.HealthPoint <= 0.0) { this.Boss.HealthPoint = (float)this.Boss.MaxHP; this.Boss.Life = 1; this.Boss.Time = 1; this.Boss.Region = 20; this.Boss.LifeTime = 9999999; this.StageData.SlowMode = 0; } else { new EndStage(this.StageData, "All", false, 100).LifeTime = 210; ClearBonus clearBonus = new ClearBonus(this.StageData, 6000000 * (int)(this.Difficulty + 1) + (this.MyPlane.Life * 20000000 + this.MyPlane.Spell * 5000000 + this.MyPlane.GreenPoint * 1000)); } }
public override void Ctrl() { ++this.Time; if (this.Time > 50) { ++this.FogStart; if ((double)this.FogStart > 10.0) { this.FogStart = 10f; } this.FogEnd += 20f; if ((double)this.FogEnd > 900.0) { this.FogEnd = 900f; } } this.Velocity += this.Accelerate; if ((double)this.Velocity < 0.5) { this.Velocity = 0.5f; } this.CameraPosition.Y += this.Velocity; this.CameraTarget.Y += this.Velocity; this.CameraPosition.X = 40f * (float)Math.Sin((double)this.Time / 360.0); this.CameraTarget.X = 40f * (float)Math.Sin((double)(this.Time - 60) / 360.0); Rectangle boundRect; if (this.TimeMain == 3) { StageDataPackage stageData = this.StageData; boundRect = this.BoundRect; double num1 = (double)(boundRect.Width / 2); boundRect = this.BoundRect; double num2 = (double)(boundRect.Height / 2); PointF OriginalPosition = new PointF((float)num1, (float)num2); BaseParticle3D baseParticle3D = new BaseParticle3D(stageData, "BG01a", OriginalPosition, 0.0f, Math.PI / 2.0); baseParticle3D.TransparentVelocityDictionary.Add(500, -2f); this.Background3D.BackgroundParticleList.Add(baseParticle3D); new Background3DObject(this.StageData, "祭坛", new PointF(0.0f, 0.0f), false).Scale = 10f; this.Velocity = 0.0f; this.CameraPosition = new Vector3(0.0f, -550f, 280f); this.CameraTarget = new Vector3(0.0f, 0.0f, 100f); this.CameraDirection = new Vector3(0.0f, 0.0f, 1f); } if (this.TimeMain > 0 && this.TimeMain < 800) { this.CameraTarget.Z += 1.5f; this.CameraPosition.Z += 1.5f; } else if (this.TimeMain == 800) { this.PosY2 -= 4000; this.Background3D.BackgroundList.Clear(); for (; (double)this.PosY2 < (double)this.CameraPosition.Y + 6132.0; this.PosY2 += 1314) { Background3DObject background3Dobject1 = new Background3DObject(this.StageData, "云(亮层)", new PointF(0.0f, (float)this.PosY2), true); background3Dobject1.Scale = 3f; background3Dobject1.Mirrored = false; background3Dobject1.OriginalPositionZ = this.CameraPosition.Z - 200f; background3Dobject1.Angle3DX = -3.141593f; background3Dobject1.TransparentValueF = 0.0f; background3Dobject1.MaxTransparent = 250; background3Dobject1.TransparentVelocity = 2.5f; background3Dobject1.Velocity = 0.0f; Background3DObject background3Dobject2 = new Background3DObject(this.StageData, "Cloud01", new PointF(0.0f, (float)(this.PosY2 + 250)), false); background3Dobject2.Scale = 3f; background3Dobject2.Mirrored = true; background3Dobject2.OriginalPositionZ = (float)((double)this.CameraPosition.Z - 200.0 + 20.0); background3Dobject2.Angle3DX = -3.141593f; background3Dobject2.TransparentValueF = 0.0f; background3Dobject2.MaxTransparent = 50; background3Dobject2.TransparentVelocity = 0.5f; background3Dobject2.Velocity = 0.5f; background3Dobject2.Direction = -1.0 * Math.PI / 2.0; Background3DObject bo = background3Dobject2; bo.CtrlCall = (BaseObject.CtrlActionCallBack)(x => { if (bo.Time <= 100) { return; } bo.TransparentVelocity = -0.6283185f * (float)Math.Sin((double)(this.Time - 100) / 300.0 * Math.PI * 2.0); }); } } else if (this.TimeMain > 800) { if (this.TimeMain < 1000) { ++this.CameraPosition.Z; } if (this.TimeMain < 8000 && this.Time % 10 == 0) { Background3DObject background3Dobject = new Background3DObject(this.StageData, "591-1", new PointF((float)this.Ran.Next(-400, 400), this.CameraPos.Y + (float)this.Ran.Next(100, 500)), false); background3Dobject.Scale = (float)this.Ran.Next(80, 100) / 100f; background3Dobject.ScaleVelocity = -0.004f; background3Dobject.Velocity = (float)this.Ran.Next(-10, 10) / 20f; background3Dobject.DirectionDegree = (double)this.Ran.Next(360); background3Dobject.VelocityZ = (float)this.Ran.Next(6, 15) / 20f; background3Dobject.LifeTime = 200; background3Dobject.Active = true; background3Dobject.Angle3DX = this.StageData.Background3D.Envi.CameraAngle - 1.570796f; background3Dobject.TransparentValueF = 0.0f; background3Dobject.TransparentVelocity = 10f; background3Dobject.OriginalPositionZ = this.CameraPosition.Z - 200f; } if (8000 < this.TimeMain && this.TimeMain < 8200) { this.CameraTarget.Z += 1.5f; } } if (this.TimeMain == 8200) { StageDataPackage stageData = this.StageData; boundRect = this.BoundRect; double num1 = (double)(boundRect.Width / 2); boundRect = this.BoundRect; double num2 = (double)(boundRect.Height / 2); PointF OriginalPosition = new PointF((float)num1, (float)num2); BaseParticle3D baseParticle3D = new BaseParticle3D(stageData, "夜空(暗)", OriginalPosition, 0.0f, Math.PI / 2.0); baseParticle3D.TransparentValueF = 0.0f; baseParticle3D.TransparentVelocity = 3f; this.Background3D.BackgroundParticleList.Add(baseParticle3D); } if (this.TimeMain == 8401 && this.Background3D.BackgroundParticleList.Count == 0) { StageDataPackage stageData = this.StageData; boundRect = this.BoundRect; double num1 = (double)(boundRect.Width / 2); boundRect = this.BoundRect; double num2 = (double)(boundRect.Height / 2); PointF OriginalPosition = new PointF((float)num1, (float)num2); this.Background3D.BackgroundParticleList.Add(new BaseParticle3D(stageData, "夜空(暗)", OriginalPosition, 0.0f, Math.PI / 2.0)); } for (int index = this.Background3D.BackgroundList.Count - 1; index >= 0; --index) { if ((double)this.Background3D.BackgroundList[index].OriginalPosition.Y < (double)this.CameraPosition.Y - 1000.0) { this.Background3D.BackgroundList.RemoveAt(index); } } this.light.Diffuse = (Color4)this.LightColor; this.light.Ambient = (Color4)this.LightColor; this.light.Direction = new Vector3(0.0f, 0.0f, -1f); }
public override void Ctrl() { ++this.Time; this.Velocity += this.Accelerate; this.CameraPosition.Y += this.Velocity; this.CameraTarget.Y += this.Velocity; this.CameraPosition.Z += this.Velocity; this.CameraTarget.Z += this.Velocity; if ((double)this.CameraPosition.Y > -100.0) { this.CameraPosition.Y -= 150f; this.CameraTarget.Y -= 150f; this.CameraPosition.Z -= 150f; this.CameraTarget.Z -= 150f; } this.CameraPosition.X += 0.05555556f * (float)Math.Cos((double)this.Time / 180.0); this.CameraTarget.X += 0.05555556f * (float)Math.Cos((double)this.Time / 180.0); if (this.Time > 100 && this.Time < 5050) { ++this.FogEnd; if ((double)this.FogEnd > 700.0) { this.FogEnd = 700f; } } if (this.TimeMain > 400 && this.TimeMain < 700) { --this.CameraPosition.X; --this.CameraTarget.X; } else if (this.TimeMain >= 700 && this.TimeMain < 800) { this.CameraPosition.X -= 0.5f; this.CameraTarget.X -= 0.5f; } else if (this.TimeMain >= 800 && this.TimeMain < 850) { this.CameraPosition.X -= 0.2f; this.CameraTarget.X -= 0.2f; } if (this.TimeMain > 200 && this.TimeMain < 300) { this.CameraPosition.Y += 0.5f; this.CameraPosition.Z -= 0.5f; } else if (this.TimeMain > 1100 && this.TimeMain < 1400) { this.CameraPosition.X += 0.1f; this.CameraTarget.X += 0.13f; this.CameraPosition.Z -= 0.1f; if ((double)this.CameraDirection.X < 0.0299999993294477) { this.CameraDirection.X += 0.0001f; } } else if (this.TimeMain > 1800 && this.TimeMain < 2100) { if ((double)this.CameraPosition.X > 30.0) { this.CameraPosition.X -= 0.35f; } if ((double)this.CameraTarget.X < 200.0) { this.CameraTarget.X += 0.25f; } this.CameraPosition.Z -= 0.3f; this.CameraDirection.X -= 0.0001f; } if (this.TimeMain > 8200 && this.TimeMain < 8250) { BaseParticle3D baseParticle3D1 = new BaseParticle3D(this.StageData, "云(亮层)", new PointF((float)(this.BoundRect.Width / 2 + this.Ran.Next(-20, 20)), (float)(240 + this.Ran.Next(-20, 20))), 0.0f, 0.0); baseParticle3D1.TransparentValueF = 0.0f; baseParticle3D1.TransparentVelocity = 0.2f; baseParticle3D1.Scale = 2f; baseParticle3D1.ColorValue = Color.Gray; BaseParticle3D baseParticle3D2 = baseParticle3D1; baseParticle3D2.TransparentVelocityDictionary.Add(300, -0.2f); baseParticle3D2.AngularVelocityDegree = (float)this.Ran.Next(-50, 50) / 20f; baseParticle3D2.Depth = (float)(this.TimeMain - 8200) / 10f; baseParticle3D2.LifeTime = 1500; this.Background3D.BackgroundParticleList.Add(baseParticle3D2); } if (this.TimeMain == 8601) { this.Background3D.BackgroundList.Clear(); new Background3DObject(this.StageData, "祭坛", new PointF(0.0f, 0.0f), false).Scale = 10f; this.Velocity = 0.0f; this.CameraPosition = new Vector3(0.0f, -480f, 480f); this.CameraTarget = new Vector3(0.0f, 0.0f, 300f); this.CameraDirection = new Vector3(0.0f, 0.0f, 1f); this.FogEnd = 700f; this.FogStart = 200f; } if (this.TimeMain > 8600) { this.CameraPosition.X += 0.1f * (float)Math.Cos((double)this.Time / 180.0); this.CameraTarget.X += 0.08333334f * (float)Math.Cos((double)this.Time / 180.0); this.CameraPosition.Y -= 0.05882353f * (float)Math.Cos((double)this.Time / 180.0); this.CameraTarget.Y -= 0.07692308f * (float)Math.Cos((double)this.Time / 180.0); } this.LightColor = Color.White; this.light.Diffuse = (Color4)this.LightColor; this.light.Ambient = (Color4)this.LightColor; this.light.Direction = new Vector3(0.0f, 0.0f, -1f); }