Exemple #1
0
        public EmitterGiveOutEnegy3D(StageDataPackage StageData, PointF OriginalPosition, Color color)
            : base(StageData)
        {
            this.OriginalPosition = OriginalPosition;
            this.Velocity         = 0.0f;
            this.Direction        = 0.0;
            this.LifeTime         = 25;
            this.ColorValue       = color;
            BaseEffect baseEffect = new BaseEffect(StageData, "Effect-2", this.Position, 0.0f, 0.0);

            baseEffect.LifeTime            = 100;
            baseEffect.Scale               = 1f;
            baseEffect.ScaleVelocity       = 0.8f;
            baseEffect.ColorValue          = color;
            baseEffect.TransparentValueF   = 180f;
            baseEffect.TransparentVelocity = -2f;
        }
Exemple #2
0
        public EmitterSaveEnegy3D(StageDataPackage StageData, PointF OriginalPosition, Color color)
            : base(StageData)
        {
            this.OriginalPosition = OriginalPosition;
            this.Velocity         = 0.0f;
            this.Direction        = 0.0;
            this.LifeTime         = 25;
            this.ColorValue       = color;
            BaseEffect baseEffect = new BaseEffect(StageData, "Effect-2", this.Position, 0.0f, 0.0);

            baseEffect.LifeTime            = 50;
            baseEffect.Scale               = 14f;
            baseEffect.ScaleVelocity       = -0.25f;
            baseEffect.ColorValue          = color;
            baseEffect.TransparentValueF   = 0.0f;
            baseEffect.TransparentVelocity = 6f;
            baseEffect.MaxTransparent      = 128;
        }
Exemple #3
0
 public override void Ctrl()
 {
     base.Ctrl();
     if (this.Time == 1)
     {
         BaseEffect baseEffect1 = new BaseEffect(this.StageData, "球", this.Position, 0.0f, 0.0);
         baseEffect1.ScaleWidth  = 0.05f;
         baseEffect1.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 (this.Time == 120)
     {
         this.StageData.SoundPlay("se_cat00.wav");
         EmitterGiveOutEnegy3D emitterGiveOutEnegy3D = new EmitterGiveOutEnegy3D(this.StageData, this.OriginalPosition, Color.Green);
         this.StageData.VibrateStart(this.LifeTime - this.Time);
         this.ScaleVelocity = 10f;
     }
     else if (120 < this.Time && this.Time <= 170)
     {
         this.AngularVelocityDegree = 2.5f;
         BaseEffect baseEffect1 = new BaseEffect(this.StageData, "bullet50_5", this.Position, 7f, this.Angle - Math.PI / 2.0);
         baseEffect1.ScaleLength = 15f;
         baseEffect1.ScaleWidth  = 0.3f;
         BaseEffect baseEffect2 = new BaseEffect(this.StageData, "bullet50_5", this.Position, 7f, -1.0 * Math.PI / 2.0 - this.Angle);
         baseEffect2.ScaleLength = 15f;
         baseEffect2.ScaleWidth  = 0.3f;
     }
     else
     {
         if (this.Time != 240)
         {
             return;
         }
         this.Damage = 0;
     }
 }
Exemple #4
0
 public override void Shoot()
 {
     if (this.Time == 10)
     {
         BaseEffect baseEffect = new BaseEffect(this.StageData, this.EDText, this.OriginalPosition, 0.0f, 0.0);
         baseEffect.Scale               = this.Scale;
         baseEffect.Direction           = Math.PI / 2.0;
         baseEffect.OriginalPosition    = this.OriginalPosition;
         baseEffect.Active              = false;
         baseEffect.TransparentValueF   = 0.0f;
         baseEffect.TransparentVelocity = 10f;
         baseEffect.LifeTime            = 322 + this.Hold;
         baseEffect.TransparentVelocityDictionary.Add(300 + this.Hold, -12f);
     }
     for (int index = 0; index < 5; ++index)
     {
         if (this.Time == 1 + index * 3)
         {
             new EDPetal(this.StageData, "ED_Petal", this.OriginalPosition, 0.0f, 0.0)
             {
                 DestAngleDegree = ((double)(72 * index))
             }
         }
Exemple #5
0
 public override void HitCheckAll()
 {
     if (!this.MyPlane.HitEnabled)
     {
         return;
     }
     if (this.HitCheck((BaseObject)this.MyPlane))
     {
         this.MyPlane.PreMiss();
         if (this.UnRemoveable)
         {
             return;
         }
         this.GiveEndEffect();
         this.BulletList.Remove(this);
     }
     else
     {
         if (this.Grazed || !this.HitCheck((BaseObject)this.MyPlane, 24f / this.ScaleLength + (float)this.Region))
         {
             return;
         }
         this.Grazed = true;
         ++this.MyPlane.Graze;
         if (this.MyPlane.Graze % 10 == 0)
         {
             this.MyPlane.HighItemScore += 10;
         }
         this.StageData.SoundPlay("se_graze.wav");
         BaseEffect baseEffect = new BaseEffect(this.StageData, "GrazeG", this.MyPlane.Position, 5f, this.Ran.NextDouble() * Math.PI * 2.0);
         baseEffect.Scale = 1f;
         baseEffect.TransparentVelocity = -20f;
         baseEffect.ScaleVelocity       = -0.05f;
         baseEffect.AngleWithDirection  = false;
     }
 }
Exemple #6
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);
        }
Exemple #7
0
 public override void UpdateData()
 {
     if (TimeMain == 50)
     {
         BaseEffect baseEffect = new BaseEffect(StageData, "woshixingtu", new PointF(385f, 240f), 4f, 0.0);
         baseEffect.AngleDegree        = 90.0;
         baseEffect.Active             = false;
         baseEffect.DestPoint          = new PointF(320f, 240f);
         baseEffect.AngleWithDirection = false;
         baseEffect.Scale               = 1f;
         baseEffect.TransparentValueF   = 0.0f;
         baseEffect.TransparentVelocity = 5f;
     }
     else if (TimeMain == 100)
     {
         BaseEffect baseEffect = new BaseEffect(StageData, "woshibiaotihebaisi", new PointF(385f, 240f), 4f, 0.0);
         baseEffect.AngleDegree        = 90.0;
         baseEffect.Active             = false;
         baseEffect.DestPoint          = new PointF(320f, 240f);
         baseEffect.AngleWithDirection = false;
         baseEffect.Scale               = 1f;
         baseEffect.TransparentValueF   = 0.0f;
         baseEffect.TransparentVelocity = 5f;
         EmitterTitleStarFall emitterTitleStarFall = new EmitterTitleStarFall(StageData);
         StageData.MenuGroupList.Add(new MenuGroup_Main(StageData));
     }
     else if (TimeMain == 130)
     {
         SelectBox selectBox = new SelectBox(StageData);
         selectBox.Velocity         = 100f;
         selectBox.OriginalPosition = new PointF(0.0f, 500f);
         SelectFrame = selectBox;
     }
     if (StageData.MenuGroupList.Count > 0)
     {
         BaseMenuItem menuItem1 = StageData.MenuGroupList[StageData.MenuGroupList.Count - 1].MenuItemList[StageData.MenuGroupList[StageData.MenuGroupList.Count - 1].MenuSelectIndex];
         PointF       pointF1;
         if (StageData.MenuGroupList.Count == 1 || StageData.MenuGroupList[StageData.MenuGroupList.Count - 1] is MenuOption)
         {
             StageDataPackage stageData = StageData;
             MyRandom         ran       = Ran;
             pointF1 = menuItem1.OriginalPosition;
             int minValue = (int)pointF1.X - 10;
             pointF1 = menuItem1.OriginalPosition;
             int    maxValue = (int)pointF1.X + menuItem1.TxtureObject.PosRect.Width + 10;
             double num1     = ran.Next(minValue, maxValue);
             pointF1 = menuItem1.OriginalPosition;
             double   num2      = pointF1.Y + 20.0;
             PointF   Position  = new PointF((float)num1, (float)num2);
             double   num3      = StageData.Ran.Next(10, 20) / 10;
             double   Direction = -1.0 * Math.PI / 2.0 - StageData.Ran.Next(1, 5) / 10.0;
             Particle particle  = new Particle(stageData, "Star", Position, (float)num3, Direction);
             particle.Active   = true;
             particle.Scale    = StageData.Ran.Next(15, 40) / 100f;
             particle.LifeTime = 20;
         }
         if (SelectFrame != null)
         {
             BaseMenuItem menuItem2 = StageData.MenuGroupList[0].MenuItemList[StageData.MenuGroupList[0].MenuSelectIndex];
             pointF1 = SelectFrame.DestPoint;
             double y1 = pointF1.Y;
             pointF1 = menuItem2.OriginalPosition;
             double y2 = pointF1.Y;
             if (Math.Abs((float)(y1 - y2 - 6.0)) >= 1.0)
             {
                 BaseEffect selectFrame = SelectFrame;
                 pointF1 = SelectFrame.DestPoint;
                 double y3 = pointF1.Y;
                 pointF1 = menuItem2.OriginalPosition;
                 double y4  = pointF1.Y;
                 double num = Math.Abs((float)(y3 - y4 - 6.0)) / 5.0;
                 selectFrame.Velocity = (float)num;
                 if (SelectFrame.Velocity > 16.0)
                 {
                     SelectFrame.Velocity = 16f;
                 }
                 else if (SelectFrame.Velocity < 2.0)
                 {
                     SelectFrame.Velocity = 2f;
                 }
             }
             BaseEffect selectFrame1 = SelectFrame;
             pointF1 = menuItem2.OriginalPosition;
             PointF pointF2 = new PointF(0.0f, (float)(pointF1.Y + 6.0));
             selectFrame1.DestPoint = pointF2;
         }
     }
     base.UpdateData();
     if (0 <= TimeMain && TimeMain < 130)
     {
         BackgroundLight += 4;
         if (BackgroundLight <= byte.MaxValue)
         {
             return;
         }
         BackgroundLight = byte.MaxValue;
     }
     else
     {
         BackgroundLight = byte.MaxValue;
     }
 }