Пример #1
0
        public static void ShootItem(
            StageDataPackage StageData,
            string BPicName,
            PointF OriginalPosition,
            float Scale)
        {
            bool[,] bulletPic = StageData.GlobalData.BulletPicDictionary[BPicName];
            float num1 = Scale;
            int   num2 = (int)Math.Sqrt((double)bulletPic.Length);

            for (int index1 = 0; index1 < num2; ++index1)
            {
                for (int index2 = 0; index2 < num2; ++index2)
                {
                    if (bulletPic[index1, index2])
                    {
                        PointF OriginalPosition1 = new PointF(OriginalPosition.X + (float)(index1 - num2 / 2) * num1 + (float)StageData.Ran.Next(-2, 3), OriginalPosition.Y + (float)(index2 - num2 / 2) * num1 + (float)StageData.Ran.Next(-2, 3));
                        if (StageData.Ran.Next(100) < 60)
                        {
                            ScoreItem_Touhou scoreItemTouhou = new ScoreItem_Touhou(StageData, OriginalPosition1);
                        }
                        else
                        {
                            PowerItem_Touhou powerItemTouhou = new PowerItem_Touhou(StageData, OriginalPosition1);
                        }
                    }
                }
            }
        }
Пример #2
0
 public override void GiveItems()
 {
     if (this.MyPlane.Power < 400)
     {
         PointF OriginalPosition;
         for (int index = 0; index < 15; ++index)
         {
             OriginalPosition = new PointF(this.OriginalPosition.X + (float)this.Ran.Next(-49, 50), this.OriginalPosition.Y + (float)this.Ran.Next(-49, 50));
             PowerItem_Touhou powerItemTouhou = new PowerItem_Touhou(this.StageData, OriginalPosition);
         }
         for (int index = 0; index < 15; ++index)
         {
             OriginalPosition = new PointF(this.OriginalPosition.X + (float)this.Ran.Next(-49, 50), this.OriginalPosition.Y + (float)this.Ran.Next(-49, 50));
             ScoreItem_Touhou scoreItemTouhou = new ScoreItem_Touhou(this.StageData, OriginalPosition);
         }
     }
     else
     {
         for (int index = 0; index < 30; ++index)
         {
             ScoreItem_Touhou scoreItemTouhou = new ScoreItem_Touhou(this.StageData, new PointF(this.OriginalPosition.X + (float)this.Ran.Next(-49, 50), this.OriginalPosition.Y + (float)this.Ran.Next(-49, 50)));
         }
     }
 }