Esempio n. 1
0
        public override void Ctrl()
        {
            base.Ctrl();
            if (1 < Time && Time < 50)
            {
                ScaleVelocity += 0.0004f;
            }
            else if (150 < Time && Time < 240)
            {
                ScaleVelocity -= 0.0004f;
            }
            else if (Time == 240)
            {
                ScaleVelocity = -Scale / 20;
            }
            else if (Time == 260)
            {
                ScaleVelocity = 0.0f;
            }
            if (Time == 22)
            {
                StageData.VibrateStart(LifeTime - Time);
            }
            if (Time == 260)
            {
                EmitterGiveOutEnegy3D emitterGiveOutEnegy3D1 = new EmitterGiveOutEnegy3D(StageData, OriginalPosition, Color.FromArgb(150, 150, byte.MaxValue));
                EmitterGiveOutEnegy3D emitterGiveOutEnegy3D2 = new EmitterGiveOutEnegy3D(StageData, OriginalPosition, Color.FromArgb(150, 150, byte.MaxValue));
                EmitterGiveOutEnegy3D emitterGiveOutEnegy3D3 = new EmitterGiveOutEnegy3D(StageData, OriginalPosition, Color.FromArgb(150, 150, byte.MaxValue));
                StageData.SoundPlay("se_cat00.wav");
            }
            if (Time % 12 != 0)
            {
                return;
            }
            int    num1     = 60;
            double num2     = 360.0 / num1;
            float  Velocity = Time < 150 ? 2.0f + Time * 4.0f / 150.0f : 6f;

            for (int index = 0; index < num1; ++index)
            {
                BaseEffect baseEffect1 = new BaseEffect(StageData, "yuan_9", Position, Velocity, 0.0)
                {
                    DirectionDegree   = num2 * index,
                    ScaleWidth        = 0.4f,
                    ScaleLength       = 0.13f,
                    LifeTime          = 60,
                    TransparentValueF = 0.0f,
                    ColorValue        = Color.FromArgb(100, 100, 200)
                };
                BaseEffect baseEffect2 = baseEffect1;
                baseEffect2.AccelerateDictionary.Add(1, -(Velocity - 0.5f) / 50.0f);
                baseEffect2.AccelerateDictionary.Add(50, 0.0f);
                baseEffect2.ScaleWidthVelocityDictionary.Add(1, 0.01f);
                baseEffect2.ScaleWidthVelocityDictionary.Add(50, 0.0f);
                baseEffect2.ScaleLengthVelocityDictionary.Add(1, -baseEffect2.ScaleLength / 50.0f);
                baseEffect2.ScaleLengthVelocityDictionary.Add(50, 0.0f);
                baseEffect2.TransparentVelocityDictionary.Add(1, 1f);
                baseEffect2.TransparentVelocityDictionary.Add(60, 0.0f);
            }
        }
Esempio n. 2
0
        public override void Ctrl()
        {
            base.Ctrl();
            if (1 < this.Time && this.Time < 50)
            {
                this.ScaleVelocity += 0.0004f;
            }
            else if (150 < this.Time && this.Time < 240)
            {
                this.ScaleVelocity -= 0.0004f;
            }
            else if (this.Time == 240)
            {
                this.ScaleVelocity = (float)(-(double)this.Scale / 20.0);
            }
            else if (this.Time == 260)
            {
                this.ScaleVelocity = 0.0f;
            }
            if (this.Time == 22)
            {
                this.StageData.VibrateStart(this.LifeTime - this.Time);
            }
            if (this.Time == 260)
            {
                EmitterGiveOutEnegy3D emitterGiveOutEnegy3D1 = new EmitterGiveOutEnegy3D(this.StageData, this.OriginalPosition, Color.FromArgb(150, 150, (int)byte.MaxValue));
                EmitterGiveOutEnegy3D emitterGiveOutEnegy3D2 = new EmitterGiveOutEnegy3D(this.StageData, this.OriginalPosition, Color.FromArgb(150, 150, (int)byte.MaxValue));
                EmitterGiveOutEnegy3D emitterGiveOutEnegy3D3 = new EmitterGiveOutEnegy3D(this.StageData, this.OriginalPosition, Color.FromArgb(150, 150, (int)byte.MaxValue));
                this.StageData.SoundPlay("se_cat00.wav");
            }
            if (this.Time % 12 != 0)
            {
                return;
            }
            int    num1     = 60;
            double num2     = 360.0 / (double)num1;
            float  Velocity = this.Time < 150 ? (float)(2.0 + (double)this.Time * 4.0 / 150.0) : 6f;

            for (int index = 0; index < num1; ++index)
            {
                BaseEffect baseEffect1 = new BaseEffect(this.StageData, "yuan_9", this.Position, Velocity, 0.0);
                baseEffect1.DirectionDegree   = num2 * (double)index;
                baseEffect1.ScaleWidth        = 0.4f;
                baseEffect1.ScaleLength       = 0.13f;
                baseEffect1.LifeTime          = 60;
                baseEffect1.TransparentValueF = 0.0f;
                baseEffect1.ColorValue        = Color.FromArgb(100, 100, 200);
                BaseEffect baseEffect2 = baseEffect1;
                baseEffect2.AccelerateDictionary.Add(1, (float)(-((double)Velocity - 0.5) / 50.0));
                baseEffect2.AccelerateDictionary.Add(50, 0.0f);
                baseEffect2.ScaleWidthVelocityDictionary.Add(1, 0.01f);
                baseEffect2.ScaleWidthVelocityDictionary.Add(50, 0.0f);
                baseEffect2.ScaleLengthVelocityDictionary.Add(1, (float)(-(double)baseEffect2.ScaleLength / 50.0));
                baseEffect2.ScaleLengthVelocityDictionary.Add(50, 0.0f);
                baseEffect2.TransparentVelocityDictionary.Add(1, 1f);
                baseEffect2.TransparentVelocityDictionary.Add(60, 0.0f);
            }
        }
Esempio n. 3
0
        private void Ctrl2()
        {
            if (!this.OnSpell)
            {
                this.ShowWings = false;
                if (this.Time == 100)
                {
                    this.StageData.SoundPlay("se_boon01.wav");
                    EmitterGiveOutEnegy3D emitterGiveOutEnegy3D = new EmitterGiveOutEnegy3D(this.StageData, this.Boss.OriginalPosition, Color.SkyBlue);
                    BackgroundWing        backgroundWing        = new BackgroundWing(this.StageData, "Wing", this.Boss.OriginalPosition, 0.0f, 0.0, 0);
                    new BackgroundWing(this.StageData, "Wing", this.Boss.OriginalPosition, 0.0f, Math.PI, 0).Mirrored = true;
                    this.StageData.VibrateStart(50);
                }
                this.Armon = 0.3f;
                if (this.Time == 1)
                {
                    Background2DRemover background2Dremover = new Background2DRemover(this.StageData);
                    this.DestPoint = (PointF) new Point(this.BoundRect.Width / 2, 160);
                }
                else if (this.Time > 150)
                {
                    this.RandomMove(346, 30, 2f, new Rectangle(this.BoundRect.Width / 2 - 60, 100, 120, 40));
                }
                if (this.Time != 160)
                {
                    return;
                }
                string FileName;
                switch (this.Difficulty)
                {
                case DifficultLevel.Easy:
                    FileName = ".\\CS\\St02\\关底Boss\\2非E.mbg";
                    break;

                case DifficultLevel.Normal:
                    FileName = ".\\CS\\St02\\关底Boss\\2非N.mbg";
                    break;

                case DifficultLevel.Hard:
                    FileName = ".\\CS\\St02\\关底Boss\\2非H.mbg";
                    break;

                case DifficultLevel.Lunatic:
                    FileName = ".\\CS\\St02\\关底Boss\\2非L.mbg";
                    break;

                default:
                    FileName = ".\\CS\\St02\\关底Boss\\2非L.mbg";
                    break;
                }
                new CSEmitterController(this.StageData, this.StageData.LoadCS(FileName)).BossBinding = true;
            }
            else if (this.Time == 1)
            {
                BulletRemover2     bulletRemover2   = new BulletRemover2(this.StageData, this.OriginalPosition);
                SpellCard_SSS02_03 spellCardSsS0203 = new SpellCard_SSS02_03(this.StageData);
            }
        }
Esempio n. 4
0
 public override void Ctrl()
 {
     base.Ctrl();
     if (Time == 1)
     {
         BaseEffect baseEffect1 = new BaseEffect(StageData, "球", Position, 0.0f, 0.0)
         {
             ScaleWidth  = 0.05f,
             ScaleLength = 0.05f
         };
         BaseEffect baseEffect2 = baseEffect1;
         baseEffect2.ScaleLengthVelocityDictionary.Add(1, 0.01666667f);
         baseEffect2.ScaleWidthVelocityDictionary.Add(1, 0.01666667f);
         baseEffect2.ScaleLengthVelocityDictionary.Add(120, 1.25f);
         baseEffect2.ScaleWidthVelocityDictionary.Add(120, 1.25f);
         baseEffect2.TransparentVelocityDictionary.Add(120, -10f);
         baseEffect2.AngularVelocityDegree = 10f;
     }
     else if (Time == 120)
     {
         StageData.SoundPlay("se_cat00.wav");
         EmitterGiveOutEnegy3D emitterGiveOutEnegy3D = new EmitterGiveOutEnegy3D(StageData, OriginalPosition, Color.Green);
         StageData.VibrateStart(LifeTime - Time);
         ScaleVelocity = 10f;
     }
     else if (120 < Time && Time <= 170)
     {
         AngularVelocityDegree = 2.5f;
         BaseEffect baseEffect1 = new BaseEffect(StageData, "bullet50_5", Position, 7f, Angle - Math.PI / 2.0)
         {
             ScaleLength = 15f,
             ScaleWidth  = 0.3f
         };
         BaseEffect baseEffect2 = new BaseEffect(StageData, "bullet50_5", Position, 7f, -1.0 * Math.PI / 2.0 - Angle)
         {
             ScaleLength = 15f,
             ScaleWidth  = 0.3f
         };
     }
     else
     {
         if (Time != 240)
         {
             return;
         }
     }
 }
Esempio n. 5
0
        public Spell_Reimu(StageDataPackage StageData)
        {
            this.StageData = StageData;
            this.Position  = this.MyPlane.Position;
            this.Damage    = 0;// 40;
            this.Region    = 64;
            this.LifeTime  = 260;
            this.Scale     = 0.0f;
            BackgroundBlack       backgroundBlack       = new BackgroundBlack(StageData, this.Position);
            EmitterGiveOutEnegy3D emitterGiveOutEnegy3D = new EmitterGiveOutEnegy3D(StageData, this.OriginalPosition, Color.FromArgb((int)byte.MaxValue, 100, 100));

            StageData.SoundPlay("se_cat00.wav");
            StageData.SoundPlay("se_nep00.wav");
            this.TxtureObject          = this.TextureObjectDictionary["YINYANGYU"];
            this.Velocity              = 2.2f;
            this.DirectionDegree       = -90.0;
            this.AngularVelocityDegree = -3f;
            this.Accelerate            = (float)(-(double)this.Velocity / 210.0);
            this.SpellList.Add((BaseObject)this);
        }
Esempio n. 6
0
        public Spell_Reimu(StageDataPackage StageData)
        {
            this.StageData = StageData;
            Position       = MyPlane.Position;
            Damage         = 40;
            Region         = 64;
            LifeTime       = 260;
            Scale          = 0.0f;
            BackgroundBlack       backgroundBlack       = new BackgroundBlack(StageData, Position);
            EmitterGiveOutEnegy3D emitterGiveOutEnegy3D = new EmitterGiveOutEnegy3D(StageData, OriginalPosition, Color.FromArgb(byte.MaxValue, 100, 100));

            StageData.SoundPlay("se_cat00.wav");
            StageData.SoundPlay("se_nep00.wav");
            TxtureObject          = TextureObjectDictionary["YINYANGYU"];
            Velocity              = 2.2f;
            DirectionDegree       = -90.0;
            AngularVelocityDegree = -3f;
            Accelerate            = -Velocity / 210;
            SpellList.Add(this);
        }
Esempio 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);
                    }
                }
            }
        }
Esempio n. 8
0
        public override void Ctrl()
        {
            base.Ctrl();
            if (1 < this.Time && this.Time < 60)
            {
                int    num1 = 7;
                double num2 = 360.0 / (double)num1;
                for (int index = 0; index < num1; ++index)
                {
                    BaseEffect baseEffect1 = new BaseEffect(this.StageData, "bullet23_0", this.Position, 1.5f, 0.0);
                    baseEffect1.DirectionDegree = (double)(this.Time * 18) + num2 * (double)index;
                    baseEffect1.ScaleWidth      = 0.3f;
                    baseEffect1.ScaleLength     = 0.3f;
                    baseEffect1.LifeTime        = 999;
                    BaseEffect baseEffect2 = baseEffect1;
                    baseEffect2.OutBound = false;
                    baseEffect2.DirectionVelocityDegree = -2.8f;
                    baseEffect2.VelocityDictionary.Add(40, 3f);
                    baseEffect2.AccelerateDictionary.Add(115, 2f);
                    baseEffect2.AccelerateDictionary.Add(123, 0.0f);
                    baseEffect2.DirectionVelocityDegreeDictionary.Add(115, (float)((this.Ran.NextPMDouble() - 80.0) / 45.0));
                    baseEffect2.DirectionVelocityDegreeDictionary.Add(160, 0.0f);
                    baseEffect2.ScaleLengthVelocityDictionary.Add(115, 0.3f);
                    baseEffect2.ScaleWidthVelocityDictionary.Add(115, 0.1f);
                    baseEffect2.ScaleLengthVelocityDictionary.Add(120, 0.0f);
                    baseEffect2.ScaleWidthVelocityDictionary.Add(120, 0.0f);
                    baseEffect2.SetBinding((BaseObject)this);
                    BaseEffect baseEffect3 = new BaseEffect(this.StageData, "bullet23_0", this.Position, 1.5f, 0.0);
                    baseEffect3.DirectionDegree = (double)(180 - this.Time * 18) + num2 * (double)index;
                    baseEffect3.ScaleWidth      = 0.3f;
                    baseEffect3.ScaleLength     = 0.3f;
                    baseEffect3.LifeTime        = 999;
                    BaseEffect baseEffect4 = baseEffect3;
                    baseEffect4.OutBound = false;
                    baseEffect4.DirectionVelocityDegree = 2.8f;
                    baseEffect4.VelocityDictionary.Add(40, 3f);
                    baseEffect4.AccelerateDictionary.Add(115, 2f);
                    baseEffect4.AccelerateDictionary.Add(123, 0.0f);
                    baseEffect4.DirectionVelocityDegreeDictionary.Add(115, (float)((80.0 + this.Ran.NextPMDouble()) / 45.0));
                    baseEffect4.DirectionVelocityDegreeDictionary.Add(160, 0.0f);
                    baseEffect4.ScaleLengthVelocityDictionary.Add(115, 0.3f);
                    baseEffect4.ScaleWidthVelocityDictionary.Add(115, 0.1f);
                    baseEffect4.ScaleLengthVelocityDictionary.Add(120, 0.0f);
                    baseEffect4.ScaleWidthVelocityDictionary.Add(120, 0.0f);
                    baseEffect4.SetBinding((BaseObject)this);
                }
            }
            if (130 < this.Time && this.Time < 220)
            {
                for (int index = 0; index < 3; ++index)
                {
                    BaseEffect_CS baseEffectCs1 = new BaseEffect_CS(this.StageData);
                    baseEffectCs1.TxtureObject = this.TextureObjectDictionary["bullet50_0"];
                    BaseEffect_CS baseEffectCs2 = baseEffectCs1;
                    Rectangle     boundRect     = this.BoundRect;
                    double        num1          = (double)(boundRect.Width / 2) + 200.0 * this.Ran.NextPMDouble();
                    boundRect = this.BoundRect;
                    double num2   = (double)(boundRect.Height / 2) + 280.0 * this.Ran.NextPMDouble();
                    PointF pointF = new PointF((float)num1, (float)num2);
                    baseEffectCs2.OriginalPosition = pointF;
                    baseEffectCs1.Velocity         = (float)this.Ran.NextPMDouble();
                    baseEffectCs1.Direction        = Math.PI / 2.0 * this.Ran.NextPMDouble();
                    baseEffectCs1.Scale            = 0.05f;
                    baseEffectCs1.LifeTime         = 40;
                    EventGroup eventGroup = new EventGroup();
                    eventGroup.index   = 0;
                    eventGroup.tag     = "0";
                    eventGroup.t       = 15;
                    eventGroup.addtime = 15;
                    Event event1 = new Event();
                    event1.EventString = "当前帧=1:高比变化到0,正弦,14";
                    event1.String2BulletEvent();
                    eventGroup.EventList.Add(event1);
                    Event event2 = new Event();
                    event2.EventString = "当前帧=1:宽比变化到0,正弦,14";
                    event2.String2BulletEvent();
                    eventGroup.EventList.Add(event2);
                    baseEffectCs1.EventGroupList.Add(eventGroup);
                    this.EffectList.Add((BaseEffect)baseEffectCs1);
                }
            }
            if (this.Time != 122)
            {
                return;
            }
            this.ScaleVelocity = 10f;
            EmitterGiveOutEnegy3D emitterGiveOutEnegy3D = new EmitterGiveOutEnegy3D(this.StageData, this.OriginalPosition, Color.White);

            this.StageData.SoundPlay("se_cat00.wav");
            this.StageData.VibrateStart(this.LifeTime - this.Time);
        }
Esempio 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);
     }
       }
 }