public AttackBase(Actor self, AttackBaseInfo info) { this.self = self; this.info = info; var armaments = Exts.Lazy(() => self.TraitsImplementing<Armament>() .Where(a => info.Armaments.Contains(a.Info.Name))); GetArmaments = () => armaments.Value; facing = Exts.Lazy(() => self.TraitOrDefault<IFacing>()); building = Exts.Lazy(() => self.TraitOrDefault<Building>()); }
public virtual int FireDelay( Actor self, Target target, AttackBaseInfo info ) { return info.FireDelay; }
public override int FireDelay( Actor self, AttackBaseInfo info ) { return target.Actor == previousTarget ? 3 : base.FireDelay(self, info); }