Example #1
0
 public override void Ctrl()
 {
     ++this.Time;
     this.Velocity += this.Accelerate;
     if ((double)this.Velocity < 0.5)
     {
         this.Velocity = 0.5f;
     }
     for (; (double)this.PosY3 < (double)this.CameraPosition.Y + 1600.0; this.PosY3 += 200)
     {
         Background3DObject background3Dobject1 = new Background3DObject(this.StageData, "zhu", new PointF(200f, (float)this.PosY3), true)
         {
             Angle3DX = -1.570796f,
             Height   = 256f
         };
         new Background3DObject(this.StageData, "zhu", new PointF(-200f, (float)this.PosY3), true)
         {
             Angle3DX = -1.570796f,
             Height   = 256f
         }.Mirrored = true;
         new Background3DObject(this.StageData, "zhu", new PointF(200f, (float)(this.PosY3 + 100)), true)
         {
             Angle3DX = -1.570796f,
             Height   = 256f
         }.Mirrored = true;
         Background3DObject background3Dobject2 = new Background3DObject(this.StageData, "zhu", new PointF(-200f, (float)(this.PosY3 + 100)), true)
         {
             Angle3DX = -1.570796f,
             Height   = 256f
         };
     }
     for (; (double)this.PosY2 < (double)this.CameraPosition.Y + 1500.0; this.PosY2 += 310)
     {
         new Background3DObject(this.StageData, "BG02d", new PointF(0.0f, (float)this.PosY2), true).Angle3DX = -3.141593f;
     }
     for (; (double)this.PosY < (double)this.CameraPosition.Y + 1500.0; this.PosY += 133)
     {
         Background3DObject background3Dobject1 = new Background3DObject(this.StageData, "liba", new PointF(150f, (float)this.PosY), false);
         background3Dobject1.Angle    = 1.57079637050629;
         background3Dobject1.Angle3DY = -1.570796f;
         background3Dobject1.Height   = 45f;
         Background3DObject background3Dobject2 = new Background3DObject(this.StageData, "liba", new PointF(-150f, (float)this.PosY), false);
         background3Dobject2.Angle    = -1.57079637050629;
         background3Dobject2.Angle3DY = 1.570796f;
         background3Dobject2.Height   = 45f;
         Background3DObject background3Dobject3 = new Background3DObject(this.StageData, "591-1R", new PointF(150f, (float)this.PosY), false);
         background3Dobject3.Scale               = 1.5f;
         background3Dobject3.Active              = true;
         background3Dobject3.Angle3DX            = this.StageData.Background3D.Envi.CameraAngle - 1.570796f;
         background3Dobject3.TransparentValueF   = 0.0f;
         background3Dobject3.TransparentVelocity = 10f;
         background3Dobject3.Height              = 60f;
         Background3DObject background3Dobject4 = new Background3DObject(this.StageData, "591-1R", new PointF(-150f, (float)this.PosY), false);
         background3Dobject4.Scale               = 1.5f;
         background3Dobject4.Active              = true;
         background3Dobject4.Angle3DX            = this.StageData.Background3D.Envi.CameraAngle - 1.570796f;
         background3Dobject4.TransparentValueF   = 0.0f;
         background3Dobject4.TransparentVelocity = 10f;
         background3Dobject4.Height              = 60f;
     }
     for (int index = this.Background3D.BackgroundList.Count - 1; index >= 0; --index)
     {
         if ((double)this.Background3D.BackgroundList[index].OriginalPosition.Y < (double)this.CameraPosition.Y - 310.0)
         {
             this.Background3D.BackgroundList.RemoveAt(index);
         }
     }
     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);
     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.light.Diffuse   = (Color4)this.LightColor;
     this.light.Ambient   = (Color4)this.LightColor;
     this.light.Direction = new Vector3(0.0f, 0.0f, -1f);
 }