Пример #1
0
        bool ShootMovingTarget(IRangeTarget target)
        {
            int numSolutions = BallisticProjectile.GetVectorsForMovingTarget(target,
                                                                             Projectile.Position,
                                                                             myType.Speed,
                                                                             out Vector3 lowVector,
                                                                             out Vector3 highVector);

            if (numSolutions >= 1)
            {
                flier.StartFlight(lowVector);
                return(true);
            }

            return(false);
        }
Пример #2
0
        public override bool ShootProjectile(IRangeTarget target)
        {
            if (BallisticProjectile.GetTimesAndVectorsForStaticTarget(target.CurrentPosition,
                                                                      Projectile.Position,
                                                                      myType.Speed,
                                                                      out var lowTime,
                                                                      out var lowVector,
                                                                      out var highTime,
                                                                      out var highVector))
            {
                flier.StartFlight(lowVector);
                return(true);
            }

            return(false);
        }