Esempio n. 1
0
 public MultiShooter(int ID, LinkedList <Bullet> mBullet, BulletInfo bulletData, int frequency,
                     int angleRange, int lines, Vector2 relativePosition, int startFrame, int life,
                     Sprite target, string eventString, int eventLoopFrame, float randomRadius, bool isSelfSnipe, int bindingID, bool relativeBinding)
     : base(ID, relativePosition, startFrame, life, bindingID)
 {
     this.bulletData       = bulletData;
     this.localBullet      = mBullet;
     this.frequency        = frequency;
     this.angleRange       = angleRange;
     this.lines            = lines;
     this.randomRadius     = randomRadius;
     this.fireCircleRadius = bulletData.fireRadius;
     this.fireInCircle     = bulletData.isFireInCircle;
     this.target           = null;
     this.isSelfSnipe      = isSelfSnipe;
     this.isHighLight      = bulletData.isHighLight;
     this.target           = target;
     anglePerLine          = (float)angleRange / lines;
     this.randomPosition   = Vector2.Zero;
     this.circlePosition   = Vector2.Zero;
     this.relativeBinding  = relativeBinding;
     //事件处理
     this.bulletEvent   = new List <BarrageEvent>();
     this.myEvent       = new List <BarrageEvent>();
     this.myEventReader = new EventReader();
     this.currentEvent  = new List <BarrageEvent>();
     if (bulletData.bulletEvent.Length != 0)
     {
         bulletEvent = myEventReader.ReadEvent(bulletData.bulletEvent);
     }
     if (eventString.Length != 0)
     {
         myEvent = myEventReader.ReadEvent(eventString);
     }
     eventID             = 0;
     this.eventLoopFrame = eventLoopFrame;
 }