public Railgun(ProjectileArgs args, RailgunInfo info, Color beamColor, Color helixColor) { this.args = args; this.info = info; target = args.PassiveTarget; this.BeamColor = beamColor; this.HelixColor = helixColor; if (!string.IsNullOrEmpty(info.HitAnim)) { hitanim = new Animation(args.SourceActor.World, info.HitAnim); } CalculateVectors(); }
public Railgun(ProjectileArgs args, RailgunInfo info, Color beamColor, Color helixColor) { this.args = args; this.info = info; target = args.PassiveTarget; BeamColor = beamColor; HelixColor = helixColor; if (info.Inaccuracy.Length > 0) { var maxInaccuracyOffset = Util.GetProjectileInaccuracy(info.Inaccuracy.Length, info.InaccuracyType, args); target += WVec.FromPDF(args.SourceActor.World.SharedRandom, 2) * maxInaccuracyOffset / 1024; } if (!string.IsNullOrEmpty(info.HitAnim)) { hitanim = new Animation(args.SourceActor.World, info.HitAnim); } CalculateVectors(); }