Exemple #1
0
        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();
        }
Exemple #2
0
        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();
        }