Наследование: INotifyAttack, IPips, ITick, ISync
Пример #1
0
 public void Created(Actor self)
 {
     turret         = self.TraitsImplementing <Turreted>().FirstOrDefault(t => t.Name == Info.Turret);
     ammoPool       = self.TraitsImplementing <AmmoPool>().FirstOrDefault(la => la.Info.Name == Info.AmmoPoolName);
     coords         = self.Trait <BodyOrientation>();
     rangeModifiers = self.TraitsImplementing <IRangeModifier>().ToArray().Select(m => m.GetRangeModifier());
 }
Пример #2
0
 protected override void Created(Actor self)
 {
     ammoPool       = self.TraitsImplementing <AmmoPool>().Single(ap => ap.Info.Name == Info.AmmoPool);
     modifiers      = self.TraitsImplementing <IReloadAmmoModifier>().ToArray();
     remainingTicks = Info.Delay;
     base.Created(self);
 }
Пример #3
0
        protected override void Created(Actor self)
        {
            ammoPool  = self.TraitsImplementing <AmmoPool>().Single(ap => ap.Info.Name == Info.AmmoPool);
            modifiers = self.TraitsImplementing <IReloadAmmoModifier>().ToArray();
            base.Created(self);

            self.World.AddFrameEndTask(w =>
            {
                remainingTicks = Util.ApplyPercentageModifiers(Info.Delay, modifiers.Select(m => m.GetReloadAmmoModifier()));
            });
        }
Пример #4
0
        protected override void Created(Actor self)
        {
            turret              = self.TraitsImplementing <Turreted>().FirstOrDefault(t => t.Name == Info.Turret);
            ammoPool            = self.TraitsImplementing <AmmoPool>().FirstOrDefault(la => la.Info.Name == Info.AmmoPoolName);
            coords              = self.Trait <BodyOrientation>();
            notifyBurstComplete = self.TraitsImplementing <INotifyBurstComplete>().ToArray();
            notifyAttacks       = self.TraitsImplementing <INotifyAttack>().ToArray();

            rangeModifiers      = self.TraitsImplementing <IRangeModifier>().ToArray().Select(m => m.GetRangeModifier());
            reloadModifiers     = self.TraitsImplementing <IReloadModifier>().ToArray().Select(m => m.GetReloadModifier());
            damageModifiers     = self.TraitsImplementing <IFirepowerModifier>().ToArray().Select(m => m.GetFirepowerModifier());
            inaccuracyModifiers = self.TraitsImplementing <IInaccuracyModifier>().ToArray().Select(m => m.GetInaccuracyModifier());

            base.Created(self);
        }
Пример #5
0
 void INotifyCreated.Created(Actor self)
 {
     ammoPool       = self.TraitsImplementing <AmmoPool>().Single(ap => ap.Info.Name == Info.AmmoPool);
     remainingTicks = Info.Delay;
 }
Пример #6
0
 void INotifyCreated.Created(Actor self)
 {
     ammoPool       = self.TraitsImplementing <AmmoPool>().Single(ap => ap.Info.Name == Info.AmmoPool);
     modifiers      = self.TraitsImplementing <IReloadAmmoModifier>().ToArray();
     remainingTicks = Info.Delay;
 }