Exemplo n.º 1
0
        public static void ShootBulletPic02(
            StageDataPackage StageData,
            string BPicName,
            BaseObject Bullet,
            PointF OriginalPosition,
            double Direction,
            byte ColorType,
            float Scale,
            bool Mirrored)
        {
            bool[,] bulletPic = StageData.GlobalData.BulletPicDictionary[BPicName];
            int num1 = (int)Math.Sqrt((double)bulletPic.Length);
            int num2 = Mirrored ? -1 : 1;

            for (int index1 = 0; index1 < num1; ++index1)
            {
                for (int index2 = 0; index2 < num1; ++index2)
                {
                    if (bulletPic[index1, index2])
                    {
                        float             num3             = (float)((double)num2 * (double)((float)index1 - (float)(((double)num1 - 1.0) / 2.0)) * Math.Cos(Direction - Math.PI / 2.0) + (double)((float)index2 - (float)(((double)num1 - 1.0) / 2.0)) * Math.Sin(Direction - Math.PI / 2.0));
                        float             num4             = (float)((double)-num2 * (double)((float)index1 - (float)(((double)num1 - 1.0) / 2.0)) * Math.Sin(Direction - Math.PI / 2.0) + (double)((float)index2 - (float)(((double)num1 - 1.0) / 2.0)) * Math.Cos(Direction - Math.PI / 2.0));
                        PointF            pointF           = new PointF(OriginalPosition.X + num3 * Scale, OriginalPosition.Y - num4 * Scale);
                        BaseBullet_Touhou baseBulletTouhou = new BaseBullet_Touhou(StageData, (string)null, OriginalPosition, 0.0f, 0.0);
                        baseBulletTouhou.Copy(Bullet);
                        baseBulletTouhou.ColorType        = ColorType;
                        baseBulletTouhou.OriginalPosition = OriginalPosition;
                        baseBulletTouhou.DestPoint        = pointF;
                    }
                }
            }
        }
Exemplo n.º 2
0
 public override void Ctrl()
 {
     base.Ctrl();
     if (this.Time >= this.LifeTime)
     {
         this.BulletList.ForEach((Action <BaseBullet_Touhou>)(x => x.Enabled = true));
     }
     if (this.Time % 2 != 0 || this.indexY >= this.length)
     {
         return;
     }
     for (int index = 0; index < this.length; ++index)
     {
         if (this.BulletPic[index, this.indexY])
         {
             PointF            OriginalPosition = new PointF(this.OriginalPosition.X + (float)(index - this.length / 2) * 5f, this.OriginalPosition.Y + (float)(this.indexY - this.length / 2) * 5f);
             BaseBullet_Touhou baseBulletTouhou = new BaseBullet_Touhou(this.StageData, (string)null, OriginalPosition, 0.0f, 0.0);
             baseBulletTouhou.Copy(this.Bullet);
             baseBulletTouhou.OriginalPosition = OriginalPosition;
             baseBulletTouhou.Velocity         = (float)baseBulletTouhou.GetDistance(this.OriginalPosition) * 3f / (float)this.length;
             baseBulletTouhou.DirectionDegree  = (double)this.Ran.Next(360);
             baseBulletTouhou.Enabled          = false;
             this.StageData.SoundPlay("se_tan00a.wav");
         }
     }
     ++this.indexY;
 }
Exemplo n.º 3
0
        public override void Ctrl()
        {
            base.Ctrl();
            if (this.Time != this.LifeTime)
            {
                return;
            }
            BaseBullet_Touhou baseBulletTouhou = new BaseBullet_Touhou(this.StageData, this.SubBulletName, this.OriginalPosition, this.Velocity / 2f, this.Direction, this.ColorType);

            this.GiveEndEffect();
        }
Exemplo n.º 4
0
        public override void Ctrl()
        {
            base.Ctrl();
            if (this.Time != this.LifeTime)
            {
                return;
            }
            byte  colorType = this.ColorType;
            int   num1      = (int)(this.Difficulty + 4);
            float num2      = -0.5235988f;
            float num3      = -2.094395f;

            switch (this.Difficulty)
            {
            case DifficultLevel.Easy:
                num1 = 2;
                break;

            case DifficultLevel.Normal:
                num1 = 4;
                break;

            case DifficultLevel.Hard:
                num1 = 6;
                break;

            case DifficultLevel.Lunatic:
                num1 = 7;
                break;

            case DifficultLevel.Ultra:
                num1 = 8;
                break;
            }
            float num4 = num3 / ((float)num1 - 1f);

            for (int index = 0; index < num1; ++index)
            {
                BaseBullet_Touhou baseBulletTouhou = new BaseBullet_Touhou(this.StageData, this.SubBulletName + colorType.ToString(), this.OriginalPosition, 2.5f, (double)num2, colorType);
                baseBulletTouhou.Ay          = 0.08f;
                baseBulletTouhou.MaxVelocity = 2.5f;
                num2 += num4;
            }
            this.StageData.SoundPlay("se_kira01.wav");
            this.GiveEndEffect();
        }
Exemplo n.º 5
0
        public BulletGroupCircle(
            StageDataPackage StageData,
            BaseObject bullet,
            PointF OriginalPosition,
            double Direction,
            int Count,
            int Radius,
            byte ColorType)
        {
            double num = Direction;

            for (int index = 0; index < Count; ++index)
            {
                PointF            OriginalPosition1 = new PointF(OriginalPosition.X + (float)Radius * (float)Math.Cos(num), OriginalPosition.Y + (float)Radius * (float)Math.Sin(num));
                BaseBullet_Touhou baseBulletTouhou  = new BaseBullet_Touhou(StageData, (string)null, OriginalPosition1, 0.0f, 0.0, ColorType);
                baseBulletTouhou.Copy(bullet);
                baseBulletTouhou.OriginalPosition = OriginalPosition1;
                baseBulletTouhou.Direction        = num;
                num += 2.0 * Math.PI / (double)Count;
            }
            StageData.SoundPlay("se_tan00a.wav");
        }
Exemplo n.º 6
0
        public static void ShootBulletPic00(
            StageDataPackage StageData,
            bool[,] BulletPic,
            string BulletName,
            PointF OriginalPosition,
            byte ColorType)
        {
            int num = (int)Math.Sqrt((double)BulletPic.Length);

            for (int index1 = 0; index1 < num; ++index1)
            {
                for (int index2 = 0; index2 < num; ++index2)
                {
                    if (BulletPic[index1, index2])
                    {
                        PointF            OriginalPosition1 = new PointF(OriginalPosition.X + (float)index1 - (float)(num / 2), OriginalPosition.Y + (float)index2 - (float)(num / 2));
                        BaseBullet_Touhou baseBulletTouhou  = new BaseBullet_Touhou(StageData, BulletName, OriginalPosition1, 0.0f, 0.0, ColorType);
                        baseBulletTouhou.Velocity  = (float)baseBulletTouhou.GetDistance(OriginalPosition) * 3f / (float)num;
                        baseBulletTouhou.Direction = baseBulletTouhou.GetDirection(OriginalPosition) + Math.PI;
                    }
                }
            }
        }
Exemplo n.º 7
0
        public void ShootBullet()
        {
            float  x = EmitPoint.X;
            float  y = EmitPoint.Y;
            PointF originalPosition;
            float  num1;

            if (x == -99999.0)
            {
                originalPosition = MyPlane.OriginalPosition;
                num1             = originalPosition.X;
            }
            else if (x == -99998.0)
            {
                originalPosition = this.OriginalPosition;
                num1             = originalPosition.X;
            }
            else
            {
                num1 = (float)(x - 320.0 + 192.0);
            }
            float num2;

            if (y == -99999.0)
            {
                originalPosition = MyPlane.OriginalPosition;
                num2             = originalPosition.Y;
            }
            else if (y == -99998.0)
            {
                originalPosition = this.OriginalPosition;
                num2             = originalPosition.Y;
            }
            else
            {
                num2 = (float)(y - 240.0 + 224.0);
            }
            if (EmitterMode == EmitterMode.StraightLaser || EmitterMode == EmitterMode.RadialLaser || EmitterMode == EmitterMode.BendLaser)
            {
                originalPosition = this.OriginalPosition;
                num1             = originalPosition.X;
                originalPosition = this.OriginalPosition;
                num2             = originalPosition.Y;
            }
            PointF OriginalPosition = new PointF(num1 + RanX * (float)Ran.NextPMDouble(), num2 + RanY * (float)Ran.NextPMDouble());
            double edi  = EmitDirection != -99999.0 ? (EmitDirection + RanEmitDirection * Ran.NextPMDouble() + SubBullet.RanDirection * Ran.NextPMDouble()) * Math.PI / 180.0 : GetDirection(MyPlane) + (RanEmitDirection * Ran.NextPMDouble() + SubBullet.RanDirection * Ran.NextPMDouble()) * Math.PI / 180.0;
            double num3 = RadiusDirection != -99999.0 ? (RadiusDirection + RanRadiusDirection * Ran.NextPMDouble()) * Math.PI / 180.0 : GetDirection(MyPlane) + RanRadiusDirection * Ran.NextPMDouble() * Math.PI / 180.0;
            float  num4 = EmitRadius + RanRadius * (float)Ran.NextPMDouble();
            int    num5 = Way + (int)(RanWay * Ran.NextPMDouble());
            float  num6 = SubBullet.Velocity + SubBullet.RanVelocity * (float)Ran.NextPMDouble();
            float  num7 = SubBullet.AccelerateCS + SubBullet.RanAccelerate * (float)Ran.NextPMDouble();
            double num8 = SubBullet.AccDirection + SubBullet.RanAccDirection;
            double num9 = Range + RanRange * Ran.NextPMDouble();

            if (RDirectionWithDirection)
            {
                num3 += edi;
            }
            double num10 = num9 * Math.PI / 180.0 / num5;

            edi -= (num5 - 1) * num10 / 2.0;
            double num11 = num3 - (num5 - 1) * num10 / 2.0;

            if (EffectType == 2)
            {
                EmitterSaveEnegy3D emitterSaveEnegy3D = new EmitterSaveEnegy3D(StageData, OriginalPosition, CSEffect.ColorValue);
                StageData.SoundPlay("se_ch02.wav");
            }
            else if (EffectType == 3)
            {
                EmitterGiveOutEnegy3D emitterGiveOutEnegy3D = new EmitterGiveOutEnegy3D(StageData, OriginalPosition, CSEffect.ColorValue);
                StageData.SoundPlay("se_cat00.wav");
                StageData.SoundPlay("se_enep02.wav");
            }
            else
            {
                for (int index1 = 0; index1 < num5; ++index1)
                {
                    PointF p = new PointF(OriginalPosition.X + num4 * (float)Math.Cos(num11), OriginalPosition.Y + num4 * (float)Math.Sin(num11));
                    for (int index2 = 0; index2 < Count; ++index2)
                    {
                        if (EmitterMode == EmitterMode.Bullet || EmitterMode == EmitterMode.StraightLaser || EmitterMode == EmitterMode.RadialLaser || EmitterMode == EmitterMode.BendLaser)
                        {
                            BaseBullet_Touhou b = new BaseBullet_Touhou(StageData);
                            if (CSBullet != null)
                            {
                                b = (BaseBullet_Touhou)CSBullet.Clone();
                                b.OriginalPosition = p;
                                b.GhostingCount    = b.GhostingCount;
                                b.AngleDegree     += CSBullet.RanAngle * Ran.NextPMDouble();
                            }
                            else if (CSLaserS != null)
                            {
                                b = (BaseBullet_Touhou)CSLaserS.Clone();
                                b.OriginalPosition = p;
                                b.Angle            = -1.0 * Math.PI / 2.0;
                                b.Active           = true;
                            }
                            else if (CSLaserR != null)
                            {
                                b = (BaseBullet_Touhou)CSLaserR.Clone();
                                b.OriginalPosition = p;
                                b.Angle            = Math.PI / 2.0;
                                b.UnRemoveable     = true;
                                b.Active           = true;
                            }
                            else if (CSLaserB != null)
                            {
                                b = (BaseBullet_Touhou)CSLaserB.Clone();
                                b.OriginalPosition = p;
                                b.UnRemoveable     = true;
                                b.Active           = true;
                            }
                            b.GhostingCount = b.GhostingCount;
                            b.Velocity      = num6 - index2 * DeltaV;
                            b.Direction     = edi;
                            b.AccelerateCS  = num7;
                            b.AccDirection  = num8;
                            b.ID            = ID;
                            b.LayerID       = LayerID;
                            if (MotionBinding)
                            {
                                b.SetBinding(this);
                            }
                            BulletList.Add(b);
                            if (EmitterMode == EmitterMode.Bullet)
                            {
                                CSData.EmitterList.ForEach(em => {
                                    if (em.BindingID != ID)
                                    {
                                        return;
                                    }
                                    b.UnRemoveable = true;
                                    BaseEmitter_CS baseEmitterCs = (BaseEmitter_CS)em.Clone();
                                    StageData.EnemyPlaneList.Add(baseEmitterCs);
                                    baseEmitterCs.OriginalPosition  = p;
                                    baseEmitterCs.LifeTime          = SubBullet.LifeTime;
                                    baseEmitterCs.ColorValue        = SubBullet.ColorValue;
                                    baseEmitterCs.TransparentValueF = SubBullet.TransparentValueF;
                                    baseEmitterCs.Direction         = edi;
                                    baseEmitterCs.DestPoint         = SubBullet.DestPoint;
                                    baseEmitterCs.Active            = SubBullet.Active;
                                    baseEmitterCs.OutBound          = SubBullet.OutBound;
                                    if (baseEmitterCs.BindWithDirection)
                                    {
                                        baseEmitterCs.EmitDirection += edi * 180.0 / Math.PI;
                                    }
                                    baseEmitterCs.SetBinding(b);
                                    if (!baseEmitterCs.DeepBinding)
                                    {
                                        baseEmitterCs.Time     = Time;
                                        baseEmitterCs.LifeTime = Math.Min(SubBullet.LifeTime + Time, em.StartTime + em.Duration);
                                    }
                                });
                            }
                        }
                        else if (EmitterMode == EmitterMode.Enemy)
                        {
                            BaseEnemyPlane_Touhou enemy = (BaseEnemyPlane_Touhou)SubBullet.Clone();
                            enemy.LifeTime         = 0;
                            enemy.OriginalPosition = p;
                            enemy.GhostingCount    = enemy.GhostingCount;
                            enemy.Velocity         = num6 - index2 * DeltaV;
                            enemy.Direction        = edi;
                            enemy.AccelerateCS     = num7;
                            enemy.AccDirection     = num8;
                            enemy.ID      = ID;
                            enemy.LayerID = LayerID;
                            if (MotionBinding)
                            {
                                enemy.SetBinding(this);
                            }
                            EnemyPlaneList.Add(enemy);
                            CSData.EmitterList.ForEach(em => {
                                if (em.BindingID != ID)
                                {
                                    return;
                                }
                                BaseEmitter_CS baseEmitterCs = (BaseEmitter_CS)em.Clone();
                                StageData.EnemyPlaneList.Add(baseEmitterCs);
                                baseEmitterCs.OriginalPosition  = p;
                                baseEmitterCs.LifeTime          = SubBullet.LifeTime;
                                baseEmitterCs.ColorValue        = SubBullet.ColorValue;
                                baseEmitterCs.TransparentValueF = SubBullet.TransparentValueF;
                                baseEmitterCs.Direction         = edi;
                                baseEmitterCs.DestPoint         = SubBullet.DestPoint;
                                baseEmitterCs.Active            = SubBullet.Active;
                                baseEmitterCs.OutBound          = SubBullet.OutBound;
                                baseEmitterCs.SetBinding(enemy);
                                if (baseEmitterCs.BindWithDirection)
                                {
                                    baseEmitterCs.EmitDirection += edi * 180.0 / Math.PI;
                                }
                                if (!baseEmitterCs.DeepBinding)
                                {
                                    baseEmitterCs.Time     = Time;
                                    baseEmitterCs.LifeTime = Math.Min(SubBullet.LifeTime + Time, em.StartTime + em.Duration);
                                }
                            });
                        }
                        else if (EmitterMode == EmitterMode.Effect)
                        {
                            BaseEffect_CS baseEffectCs = (BaseEffect_CS)CSEffect.Clone();
                            baseEffectCs.OriginalPosition = p;
                            baseEffectCs.GhostingCount    = baseEffectCs.GhostingCount;
                            baseEffectCs.AngleDegree     += CSEffect.RanAngle * Ran.NextPMDouble();
                            baseEffectCs.Velocity         = num6 - index2 * DeltaV;
                            baseEffectCs.Direction        = edi;
                            baseEffectCs.AccelerateCS     = num7;
                            baseEffectCs.AccDirection     = num8;
                            baseEffectCs.ID      = ID;
                            baseEffectCs.LayerID = LayerID;
                            if (MotionBinding)
                            {
                                baseEffectCs.SetBinding(this);
                            }
                            EffectList.Add(baseEffectCs);
                        }
                    }
                    num11 += num10;
                    edi   += num10;
                    if (SpecifySE)
                    {
                        StageData.SoundPlay(SoundName);
                    }
                    else if (EmitterMode == EmitterMode.Bullet)
                    {
                        StageData.SoundPlay("se_tan00a.wav", OriginalPosition.X / BoundRect.Width);
                    }
                    else if (EmitterMode == EmitterMode.StraightLaser || EmitterMode == EmitterMode.RadialLaser)
                    {
                        StageData.SoundPlay("se_lazer00.wav", OriginalPosition.X / BoundRect.Width);
                    }
                }
            }
        }
Exemplo n.º 8
0
        public override bool OutBoundary()
        {
            if (this.LifeTime != 0 && this.Time > this.LifeTime)
            {
                return(true);
            }
            if (this.Reflect <= (byte)0)
            {
                if (this.Time < 100)
                {
                    return(false);
                }
                int num1 = this.Region >= 10 ? this.Region : 10;
                int num2;
                if ((double)-num1 < (double)this.OriginalPosition.X)
                {
                    PointF    originalPosition = this.OriginalPosition;
                    double    x         = (double)originalPosition.X;
                    Rectangle boundRect = this.BoundRect;
                    double    num3      = (double)(boundRect.Width + num1);
                    if (x < num3)
                    {
                        double num4 = (double)-num1;
                        originalPosition = this.OriginalPosition;
                        double y1 = (double)originalPosition.Y;
                        if (num4 < y1)
                        {
                            originalPosition = this.OriginalPosition;
                            double y2 = (double)originalPosition.Y;
                            boundRect = this.BoundRect;
                            double num5 = (double)(boundRect.Height + num1);
                            num2 = y2 >= num5 ? 1 : 0;
                            goto label_10;
                        }
                    }
                }
                num2 = 1;
label_10:
                return(num2 != 0);
            }
            int       num6 = 5;
            PointF    originalPosition1;
            Rectangle boundRect1;
            int       num7;

            if ((double)this.OriginalPosition.X >= (double)num6)
            {
                originalPosition1 = this.OriginalPosition;
                double x = (double)originalPosition1.X;
                boundRect1 = this.BoundRect;
                double num1 = (double)(boundRect1.Width - num6);
                num7 = x < num1 ? 1 : 0;
            }
            else
            {
                num7 = 0;
            }
            if (num7 == 0)
            {
                --this.Reflect;
                this.Direction -= 2.0 * (this.Direction - Math.PI / 2.0);
                BaseBullet_Touhou baseBulletTouhou = new BaseBullet_Touhou(this.StageData, this.SubBulletName, this.OriginalPosition, this.Velocity, this.Direction, this.ColorType);
                this.GiveEndEffect();
                return(true);
            }
            originalPosition1 = this.OriginalPosition;
            double y = (double)originalPosition1.Y;

            boundRect1 = this.BoundRect;
            double num8 = (double)(boundRect1.Bottom + num6);

            return(y > num8);
        }
Exemplo n.º 9
0
 public void ShootBullet()
 {
     float x = this.EmitPoint.X;
       float y = this.EmitPoint.Y;
       PointF originalPosition;
       float num1;
       if ((double) x == -99999.0)
       {
     originalPosition = this.MyPlane.OriginalPosition;
     num1 = originalPosition.X;
       }
       else if ((double) x == -99998.0)
       {
     originalPosition = this.OriginalPosition;
     num1 = originalPosition.X;
       }
       else
     num1 = (float) ((double) x - 320.0 + 192.0);
       float num2;
       if ((double) y == -99999.0)
       {
     originalPosition = this.MyPlane.OriginalPosition;
     num2 = originalPosition.Y;
       }
       else if ((double) y == -99998.0)
       {
     originalPosition = this.OriginalPosition;
     num2 = originalPosition.Y;
       }
       else
     num2 = (float) ((double) y - 240.0 + 224.0);
       if (this.EmitterMode == EmitterMode.StraightLaser || this.EmitterMode == EmitterMode.RadialLaser || this.EmitterMode == EmitterMode.BendLaser)
       {
     originalPosition = this.OriginalPosition;
     num1 = originalPosition.X;
     originalPosition = this.OriginalPosition;
     num2 = originalPosition.Y;
       }
       PointF OriginalPosition = new PointF(num1 + this.RanX * (float) this.Ran.NextPMDouble(), num2 + this.RanY * (float) this.Ran.NextPMDouble());
       double edi = this.EmitDirection != -99999.0 ? (this.EmitDirection + this.RanEmitDirection * this.Ran.NextPMDouble() + this.SubBullet.RanDirection * this.Ran.NextPMDouble()) * Math.PI / 180.0 : this.GetDirection((BaseObject) this.MyPlane) + (this.RanEmitDirection * this.Ran.NextPMDouble() + this.SubBullet.RanDirection * this.Ran.NextPMDouble()) * Math.PI / 180.0;
       double num3 = this.RadiusDirection != -99999.0 ? (this.RadiusDirection + this.RanRadiusDirection * this.Ran.NextPMDouble()) * Math.PI / 180.0 : this.GetDirection((BaseObject) this.MyPlane) + this.RanRadiusDirection * this.Ran.NextPMDouble() * Math.PI / 180.0;
       float num4 = this.EmitRadius + this.RanRadius * (float) this.Ran.NextPMDouble();
       int num5 = this.Way + (int) ((double) this.RanWay * this.Ran.NextPMDouble());
       float num6 = this.SubBullet.Velocity + this.SubBullet.RanVelocity * (float) this.Ran.NextPMDouble();
       float num7 = this.SubBullet.AccelerateCS + this.SubBullet.RanAccelerate * (float) this.Ran.NextPMDouble();
       double num8 = this.SubBullet.AccDirection + this.SubBullet.RanAccDirection;
       double num9 = this.Range + this.RanRange * this.Ran.NextPMDouble();
       if (this.RDirectionWithDirection)
     num3 += edi;
       double num10 = num9 * Math.PI / 180.0 / (double) num5;
       edi -= (double) (num5 - 1) * num10 / 2.0;
       double num11 = num3 - (double) (num5 - 1) * num10 / 2.0;
       if (this.EffectType == 2)
       {
     EmitterSaveEnegy3D emitterSaveEnegy3D = new EmitterSaveEnegy3D(this.StageData, OriginalPosition, this.CSEffect.ColorValue);
     this.StageData.SoundPlay("se_ch02.wav");
       }
       else if (this.EffectType == 3)
       {
     EmitterGiveOutEnegy3D emitterGiveOutEnegy3D = new EmitterGiveOutEnegy3D(this.StageData, OriginalPosition, this.CSEffect.ColorValue);
     this.StageData.SoundPlay("se_cat00.wav");
     this.StageData.SoundPlay("se_enep02.wav");
       }
       else
       {
     for (int index1 = 0; index1 < num5; ++index1)
     {
       PointF p = new PointF(OriginalPosition.X + num4 * (float) Math.Cos(num11), OriginalPosition.Y + num4 * (float) Math.Sin(num11));
       for (int index2 = 0; index2 < this.Count; ++index2)
       {
     if (this.EmitterMode == EmitterMode.Bullet || this.EmitterMode == EmitterMode.StraightLaser || this.EmitterMode == EmitterMode.RadialLaser || this.EmitterMode == EmitterMode.BendLaser)
     {
       BaseBullet_Touhou b = new BaseBullet_Touhou(this.StageData);
       if (this.CSBullet != null)
       {
         b = (BaseBullet_Touhou) this.CSBullet.Clone();
         b.OriginalPosition = p;
         b.GhostingCount = b.GhostingCount;
         b.AngleDegree += this.CSBullet.RanAngle * this.Ran.NextPMDouble();
       }
       else if (this.CSLaserS != null)
       {
         b = (BaseBullet_Touhou) this.CSLaserS.Clone();
         b.OriginalPosition = p;
         b.Angle = -1.0 * Math.PI / 2.0;
         b.Active = true;
       }
       else if (this.CSLaserR != null)
       {
         b = (BaseBullet_Touhou) this.CSLaserR.Clone();
         b.OriginalPosition = p;
         b.Angle = Math.PI / 2.0;
         b.UnRemoveable = true;
         b.Active = true;
       }
       else if (this.CSLaserB != null)
       {
         b = (BaseBullet_Touhou) this.CSLaserB.Clone();
         b.OriginalPosition = p;
         b.UnRemoveable = true;
         b.Active = true;
       }
       b.GhostingCount = b.GhostingCount;
       b.Velocity = num6 - (float) index2 * this.DeltaV;
       b.Direction = edi;
       b.AccelerateCS = num7;
       b.AccDirection = num8;
       b.ID = this.ID;
       b.LayerID = this.LayerID;
       if (this.MotionBinding)
         b.SetBinding((BaseObject) this);
       this.BulletList.Add(b);
       if (this.EmitterMode == EmitterMode.Bullet)
         this.CSData.EmitterList.ForEach((Action<BaseEmitter_CS>) (em =>
         {
           if (em.BindingID != this.ID)
             return;
           b.UnRemoveable = true;
           BaseEmitter_CS baseEmitterCs = (BaseEmitter_CS) em.Clone();
           this.StageData.EnemyPlaneList.Add((BaseEnemyPlane) baseEmitterCs);
           baseEmitterCs.OriginalPosition = p;
           baseEmitterCs.LifeTime = this.SubBullet.LifeTime;
           baseEmitterCs.ColorValue = this.SubBullet.ColorValue;
           baseEmitterCs.TransparentValueF = this.SubBullet.TransparentValueF;
           baseEmitterCs.Direction = edi;
           baseEmitterCs.DestPoint = this.SubBullet.DestPoint;
           baseEmitterCs.Active = this.SubBullet.Active;
           baseEmitterCs.OutBound = this.SubBullet.OutBound;
           if (baseEmitterCs.BindWithDirection)
             baseEmitterCs.EmitDirection += edi * 180.0 / Math.PI;
           baseEmitterCs.SetBinding((BaseObject) b);
           if (!baseEmitterCs.DeepBinding)
           {
             baseEmitterCs.Time = this.Time;
             baseEmitterCs.LifeTime = Math.Min(this.SubBullet.LifeTime + this.Time, em.StartTime + em.Duration);
           }
         }));
     }
     else if (this.EmitterMode == EmitterMode.Enemy)
     {
       BaseEnemyPlane_Touhou enemy = (BaseEnemyPlane_Touhou) this.SubBullet.Clone();
       enemy.LifeTime = 0;
       enemy.OriginalPosition = p;
       enemy.GhostingCount = enemy.GhostingCount;
       enemy.Velocity = num6 - (float) index2 * this.DeltaV;
       enemy.Direction = edi;
       enemy.AccelerateCS = num7;
       enemy.AccDirection = num8;
       enemy.ID = this.ID;
       enemy.LayerID = this.LayerID;
       if (this.MotionBinding)
         enemy.SetBinding((BaseObject) this);
       this.EnemyPlaneList.Add((BaseEnemyPlane) enemy);
       this.CSData.EmitterList.ForEach((Action<BaseEmitter_CS>) (em =>
       {
         if (em.BindingID != this.ID)
           return;
         BaseEmitter_CS baseEmitterCs = (BaseEmitter_CS) em.Clone();
         this.StageData.EnemyPlaneList.Add((BaseEnemyPlane) baseEmitterCs);
         baseEmitterCs.OriginalPosition = p;
         baseEmitterCs.LifeTime = this.SubBullet.LifeTime;
         baseEmitterCs.ColorValue = this.SubBullet.ColorValue;
         baseEmitterCs.TransparentValueF = this.SubBullet.TransparentValueF;
         baseEmitterCs.Direction = edi;
         baseEmitterCs.DestPoint = this.SubBullet.DestPoint;
         baseEmitterCs.Active = this.SubBullet.Active;
         baseEmitterCs.OutBound = this.SubBullet.OutBound;
         baseEmitterCs.SetBinding((BaseObject) enemy);
         if (baseEmitterCs.BindWithDirection)
           baseEmitterCs.EmitDirection += edi * 180.0 / Math.PI;
         if (!baseEmitterCs.DeepBinding)
         {
           baseEmitterCs.Time = this.Time;
           baseEmitterCs.LifeTime = Math.Min(this.SubBullet.LifeTime + this.Time, em.StartTime + em.Duration);
         }
       }));
     }
     else if (this.EmitterMode == EmitterMode.Effect)
     {
       BaseEffect_CS baseEffectCs = (BaseEffect_CS) this.CSEffect.Clone();
       baseEffectCs.OriginalPosition = p;
       baseEffectCs.GhostingCount = baseEffectCs.GhostingCount;
       baseEffectCs.AngleDegree += this.CSEffect.RanAngle * this.Ran.NextPMDouble();
       baseEffectCs.Velocity = num6 - (float) index2 * this.DeltaV;
       baseEffectCs.Direction = edi;
       baseEffectCs.AccelerateCS = num7;
       baseEffectCs.AccDirection = num8;
       baseEffectCs.ID = this.ID;
       baseEffectCs.LayerID = this.LayerID;
       if (this.MotionBinding)
         baseEffectCs.SetBinding((BaseObject) this);
       this.EffectList.Add((BaseEffect) baseEffectCs);
     }
       }
       num11 += num10;
       edi += num10;
       if (this.SpecifySE)
     this.StageData.SoundPlay(this.SoundName);
       else if (this.EmitterMode == EmitterMode.Bullet)
     this.StageData.SoundPlay("se_tan00a.wav", OriginalPosition.X / (float) this.BoundRect.Width);
       else if (this.EmitterMode == EmitterMode.StraightLaser || this.EmitterMode == EmitterMode.RadialLaser)
     this.StageData.SoundPlay("se_lazer00.wav", OriginalPosition.X / (float) this.BoundRect.Width);
     }
       }
 }