示例#1
0
文件: Emitter.cs 项目: THSJF/sjf
 public override void Shoot()
 {
     for (int index = 0; index < 10; ++index)
     {
         ParticleSmaller particleSmaller = new ParticleSmaller(this.StageData, this.MyPlane.Name == "Aya" ? "MyParticle" : "MyParticle01", this.Position, (float)(this.Ran.Next(20, 200) / 10), (double)this.Ran.Next(360) / 180.0 * Math.PI);
         particleSmaller.LifeTime          = 20;
         particleSmaller.Scale             = (float)this.Ran.Next(100) / 100f;
         particleSmaller.TransparentValueF = 200f;
     }
 }
示例#2
0
        public override void HitCheckAll()
        {
            if (this.HitCheck((BaseObject)this.MyPlane, 48f))
            {
                this.Obtain = true;
            }
            if (!this.HitCheck((BaseObject)this.MyPlane))
            {
                return;
            }
            this.ItemList.Remove((BaseItem)this);
            if (this.ColorValue == Color.Red)
            {
                this.MyPlane.LastColor = EnchantmentType.Red;
            }
            else if (this.ColorValue == Color.Blue)
            {
                this.MyPlane.LastColor = EnchantmentType.Blue;
            }
            else if (this.ColorValue == Color.Green)
            {
                this.MyPlane.LastColor = EnchantmentType.Green;
            }

            if (StageData.Boss is Boss_Tensei01)
            {
                MyPlane.StarPoint += 800;
            }
            else
            {
                MyPlane.StarPoint += 2 * 800;
            }

            if (this.ColorValue == Color.Red)
            {
                MyPlane.LifeChip += 2;
            }
            else if (this.ColorValue == Color.Blue)
            {
                this.MyPlane.HighItemScore += 1000;
            }
            else if (this.ColorValue == Color.Green)
            {
                MyPlane.SpellChip += 2;
            }
            this.StageData.SoundPlay("se_item00.wav", this.OriginalPosition.X / (float)this.BoundRect.Width);
            for (int index = 0; index < 50; ++index)
            {
                ParticleSmaller particleSmaller = new ParticleSmaller(this.StageData, "光点", this.Position, (float)(this.Ran.Next(20, 200) / 10), (double)this.Ran.Next(360) / 180.0 * Math.PI);
                particleSmaller.LifeTime          = 20;
                particleSmaller.Scale             = (float)this.Ran.Next(100) / 100f;
                particleSmaller.TransparentValueF = 200f;
                particleSmaller.ColorValue        = this.ColorValue;
            }
        }
示例#3
0
 public override void HitCheckAll()
 {
     if (HitCheck(MyPlane, 48f))
     {
         Obtain = true;
     }
     if (!HitCheck(MyPlane))
     {
         return;
     }
     ItemList.Remove(this);
     if (ColorValue == Color.Red)
     {
         MyPlane.LastColor = EnchantmentType.Red;
     }
     else if (ColorValue == Color.Blue)
     {
         MyPlane.LastColor = EnchantmentType.Blue;
     }
     else if (ColorValue == Color.Green)
     {
         MyPlane.LastColor = EnchantmentType.Green;
     }
     MyPlane.StarPoint += 800;
     if (ColorValue == Color.Red)
     {
         ++MyPlane.LifeChip;
     }
     else if (ColorValue == Color.Blue)
     {
         MyPlane.HighItemScore += 5000;
     }
     else if (ColorValue == Color.Green)
     {
         ++MyPlane.SpellChip;
     }
     StageData.SoundPlay("se_item00.wav", OriginalPosition.X / BoundRect.Width);
     for (int index = 0; index < 50; ++index)
     {
         ParticleSmaller particleSmaller = new ParticleSmaller(StageData, "光点", Position, Ran.Next(20, 200) / 10, Ran.Next(360) / 180.0 * Math.PI)
         {
             LifeTime          = 20,
             Scale             = Ran.Next(100) / 100f,
             TransparentValueF = 200f,
             ColorValue        = ColorValue
         };
     }
 }
示例#4
0
文件: EndBoss.cs 项目: THSJF/sjf
 public override void Shoot()
 {
     if (this.Time == 1)
     {
         this.StageData.SoundPlay("se_enep01.wav");
         for (int index = 0; index < 16; ++index)
         {
             ParticleSmaller particleSmaller = new ParticleSmaller(this.StageData, "光点", this.Position, (float)(2.0 + (double)this.Ran.Next(30) / 10.0), (double)this.Ran.Next(360) / 180.0 * Math.PI);
             particleSmaller.Scale      = (float)this.Ran.Next(10, 20) / 10f;
             particleSmaller.ColorValue = Color.FromArgb((int)byte.MaxValue, this.Ran.Next(20, 240), this.Ran.Next(200, (int)byte.MaxValue));
         }
         this.StageData.VibrateStart(50);
     }
     else if (this.Time == 100)
     {
         this.StageData.SoundPlay("se_enep01.wav");
         for (int index = 0; index < 60; ++index)
         {
             ParticleSmaller particleSmaller = new ParticleSmaller(this.StageData, "光点", this.Position, (float)(1.0 + (double)this.Ran.Next(50) / 10.0), (double)this.Ran.Next(360) / 180.0 * Math.PI);
             particleSmaller.Scale      = (float)this.Ran.Next(10, 20) / 10f;
             particleSmaller.ColorValue = Color.FromArgb((int)byte.MaxValue, this.Ran.Next(20, 240), this.Ran.Next(220, (int)byte.MaxValue));
         }
         this.StageData.VibrateStart(50);
         this.MyBulletList.Clear();
         this.Boss = (BaseBossTouhou)null;
     }
     else
     {
         if (this.Time != 250)
         {
             return;
         }
         EndStage      endStage      = new EndStage(this.StageData, "在世界的某个角落", true);
         TransitionOut transitionOut = new TransitionOut(this.StageData);
         try
         {
             INI_RW iniRw = new INI_RW(".\\Setting.INI");
             if (iniRw.ExistINIFile())
             {
                 iniRw.IniWriteValue("Mode", "Clear", "yes");
             }
         }
         catch
         {
         }
     }
 }
示例#5
0
 public override void Shoot()
 {
     if (this.Time % 5 != 0)
     {
         return;
     }
     for (int index = 0; index < 5; ++index)
     {
         double          num1            = (double)this.Ran.Next(360) / 180.0 * Math.PI;
         int             num2            = this.Ran.Next(10, 100);
         ParticleSmaller particleSmaller = new ParticleSmaller(this.StageData, "MyBullet000" + this.ColorType.ToString(), new PointF(this.Position.X + (float)num2 * (float)Math.Cos(num1), this.Position.Y + (float)num2 * (float)Math.Sin(num1)), 0.0f, num1 + Math.PI);
         particleSmaller.TransparentValueF = 200f;
         particleSmaller.LifeTime          = 50;
         particleSmaller.Velocity          = (float)num2 / (float)particleSmaller.LifeTime;
         particleSmaller.Scale             = (float)this.Ran.Next(20, 50) / 100f;
     }
 }
示例#6
0
        public override void Shoot()
        {
            for (int index = 0; index < 1; ++index)
            {
                string str = this.MyPlane.Name == "Aya" ? "MyParticle" : "MyParticle01";
                string textureName;
                switch (this.MyPlane.Name)
                {
                case "Aya":
                    textureName = "MyParticle";
                    break;

                case "Reimu":
                    textureName = "Light01";
                    break;

                case "Marisa":
                    textureName = "Light03";
                    break;

                case "Sanae":
                    textureName = "Light04";
                    break;

                case "Koishi":
                    textureName = "Light05";
                    break;

                default:
                    textureName = "MyParticle01";
                    break;
                }
                ParticleSmaller particleSmaller = new ParticleSmaller(this.StageData, textureName, this.Position, (float)(this.Ran.Next(100, 300) / 10), (double)this.Ran.Next(0, 180) / 180.0 * Math.PI);
                particleSmaller.LifeTime          = 10;
                particleSmaller.Scale             = (float)this.Ran.Next(60) / 100f;
                particleSmaller.TransparentValueF = 200f;
                particleSmaller.Accelerate        = -particleSmaller.Velocity / (float)particleSmaller.LifeTime;
            }
        }
示例#7
0
 public void RemoveBullets()
 {
     foreach (BaseObject bullet in this.BulletList)
     {
         bullet.GiveEndEffect();
     }
     this.BulletList.Clear();
     foreach (BaseEnemyPlane enemyPlane in this.EnemyPlaneList)
     {
         enemyPlane.GiveEndEffect();
         if (enemyPlane.TxtureObject != null)
         {
             this.SoundPlay("se_enep00.wav");
         }
     }
     this.EnemyPlaneList.Clear();
     foreach (BaseObject bullet in this.MyBulletList)
     {
         ParticleSmaller particleSmaller = new ParticleSmaller(this, "光点", bullet.Position, bullet.Velocity, bullet.Direction);
         particleSmaller.LifeTime = 30;
         particleSmaller.Scale    = 0.5f;
     }
     this.MyBulletList.Clear();
 }