Beispiel #1
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;
 }
Beispiel #2
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;
                    }
                }
            }
        }