Exemple #1
0
        public override Vector3 GetNextLanePos(NextLane nextLane)
        {
            if (nextLane == NextLane.GoLeft && currentLane != CurrentLane.Leftlane)
            {
                if (currentLane == CurrentLane.RightLane)
                {
                    currentLane = CurrentLane.MiddleLane;
                    return(laneData.MiddleLanePos);
                }

                else
                {
                    currentLane = CurrentLane.Leftlane;
                    return(laneData.LeftLanePos);
                }
            }

            else if (nextLane == NextLane.GoRight && currentLane != CurrentLane.RightLane)
            {
                if (currentLane == CurrentLane.Leftlane)
                {
                    currentLane = CurrentLane.MiddleLane;
                    return(laneData.MiddleLanePos);
                }
                else
                {
                    currentLane = CurrentLane.RightLane;
                    return(laneData.RightLanePos);
                }
            }
            else
            {
                return(Vector3.zero);
            }
        }
Exemple #2
0
        public bool Equals(AutoPilot other)
        {
            if (other == null)
            {
                return(false);
            }

            return(CurrRouteNode.Equals(other.CurrRouteNode) &&
                   NextRouteNode.Equals(other.NextRouteNode) &&
                   PrevRouteNode.Equals(other.PrevRouteNode) &&
                   TimeEnteredCurve.Equals(other.TimeEnteredCurve) &&
                   TimeToSpendOnCurrentCurve.Equals(other.TimeToSpendOnCurrentCurve) &&
                   CurrPathNodeInfo.Equals(other.CurrPathNodeInfo) &&
                   NextPathNodeInfo.Equals(other.NextPathNodeInfo) &&
                   PrevPathNodeInfo.Equals(other.PrevPathNodeInfo) &&
                   AntiReverseTimer.Equals(other.AntiReverseTimer) &&
                   TimeToStartMission.Equals(other.TimeToStartMission) &&
                   PrevDirection.Equals(other.PrevDirection) &&
                   CurrDirection.Equals(other.CurrDirection) &&
                   NextDirection.Equals(other.NextDirection) &&
                   CurrLane.Equals(other.CurrLane) &&
                   NextLane.Equals(other.NextLane) &&
                   DrivingStyle.Equals(other.DrivingStyle) &&
                   Mission.Equals(other.Mission) &&
                   TempAction.Equals(other.TempAction) &&
                   TimeTempAction.Equals(other.TimeTempAction) &&
                   MaxTrafficSpeed.Equals(other.MaxTrafficSpeed) &&
                   CruiseSpeed.Equals(other.CruiseSpeed) &&
                   SlowedDownByCars.Equals(other.SlowedDownByCars) &&
                   SlowedDownByPeds.Equals(other.SlowedDownByPeds) &&
                   StayInCurrentLevel.Equals(other.StayInCurrentLevel) &&
                   StayInFastLane.Equals(other.StayInFastLane) &&
                   IgnorePathFinding.Equals(other.IgnorePathFinding) &&
                   Destination.Equals(other.Destination) &&
                   PathFindNodesCount.Equals(other.PathFindNodesCount));
        }
Exemple #3
0
 public abstract Vector3 GetNextLanePos(NextLane nextLane);