Пример #1
0
 public FlightPath(Vector3 start, Vector3 end, IFlightNavigationArgs flightNavigationArgs, ushort zoneId = 0)
 {
     this.zoneId = zoneId == 0 ? WorldManager.ZoneId : zoneId;
     this.flightNavigationArgs = flightNavigationArgs;
     startCenterOfCube         = GetCenterOfCube(start, flightNavigationArgs.Radius);
     endCenterOfCube           = GetCenterOfCube(end, flightNavigationArgs.Radius);
     Start = start;
     End   = end;
 }
Пример #2
0
        public FlightEnabledNavigator(
            NavigationProvider innerNavigator,
            IFlightEnabledPlayerMover playerMover,
            IFlightNavigationArgs flightNavigationArgs) : base(innerNavigator)
        {
            logger                       = new Logger(new FlightEnabledNavigatorLogColors(), "FlightNav");
            this.playerMover             = playerMover;
            this.flightNavigationArgs    = flightNavigationArgs;
            Navigator.NavigationProvider = this;
            CurrentPath                  = new FlightPath(Vector3.Zero, Vector3.Zero, flightNavigationArgs);

            logger.Verbose(Localization.Localization.FlightEnabledNavigator_Enabled);
        }
Пример #3
0
		public FlightEnabledNavigator(
			INavigationProvider innerNavigator,
			IFlightEnabledPlayerMover playerMover,
			IFlightNavigationArgs flightNavigationArgs)
		{
			logger = new Logger(this);
			this.innerNavigator = innerNavigator;
			this.playerMover = playerMover;
			this.flightNavigationArgs = flightNavigationArgs;
			Navigator.NavigationProvider = this;
			CurrentPath = new FlightPath(Vector3.Zero, Vector3.Zero, flightNavigationArgs);

			logger.Verbose(Localization.Localization.FlightEnabledNavigator_Enabled);
		}
Пример #4
0
		public FlightEnabledNavigator(
			INavigationProvider innerNavigator,
			IFlightEnabledPlayerMover playerMover,
			IFlightNavigationArgs flightNavigationArgs)
		{
			this.logger = new Logger(this);
			this.innerNavigator = innerNavigator;
			this.playerMover = playerMover;
			this.flightNavigationArgs = flightNavigationArgs;
			Navigator.NavigationProvider = this;
			CurrentPath = new FlightPath(Vector3.Zero, Vector3.Zero, flightNavigationArgs);

			logger.Verbose("Replacing Navigator with Flight Navigator.");
		}
Пример #5
0
        public bool Equals(Vector3 start, Vector3 end, IFlightNavigationArgs args)
        {
            if (Math.Abs(flightNavigationArgs.ForcedAltitude - args.ForcedAltitude) > float.Epsilon)
            {
                return(false);
            }

            if (Math.Abs(flightNavigationArgs.Smoothing - args.Smoothing) > float.Epsilon)
            {
                return(false);
            }

            if (Math.Abs(flightNavigationArgs.InverseParabolicMagnitude - args.InverseParabolicMagnitude) > float.Epsilon)
            {
                return(false);
            }

            return(start.Distance3D(Start) < args.Radius / 2 && end.Distance3D(End) < args.Radius / 2);
        }
Пример #6
0
 public static Guid GetKey(Vector3 start, Vector3 end, IFlightNavigationArgs args)
 {
     return(GetKey(new FlightPath(start, end, args)));
 }
Пример #7
0
 public StraightOrParabolicFlightPath(Vector3 start, Vector3 end, IFlightNavigationArgs flightNavigationArgs)
     : base(start, end, flightNavigationArgs)
 {
 }