Example #1
0
		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>());
		}
Example #2
0
 public virtual int FireDelay( Actor self, Target target, AttackBaseInfo info )
 {
     return info.FireDelay;
 }
Example #3
0
 public override int FireDelay( Actor self, AttackBaseInfo info )
 {
     return target.Actor == previousTarget ? 3 : base.FireDelay(self, info);
 }