コード例 #1
0
        public void findAdditiveLinks()
        {
            if (previousAdditiveWaypoint != null || nextAdditiveWaypoint != null)
            {
                AdditiveWaypointsManager.Instance.waypoints.Add(this);
            }

            if (previousAdditiveWaypoint != null && previousWaypoint == null)
            {
                WaypointData additiveWaypoint = AdditiveWaypointsManager.Instance.getByName(previousAdditiveWaypoint);

                if (additiveWaypoint != null)
                {
                    previousWaypoint = additiveWaypoint;
                    previousWaypoint.findAdditiveLinks();
                }
            }
            if (nextAdditiveWaypoint != null && nextWaypoint == null)
            {
                WaypointData additiveWaypoint = AdditiveWaypointsManager.Instance.getByName(nextAdditiveWaypoint);

                if (additiveWaypoint != null)
                {
                    nextWaypoint = additiveWaypoint;
                    nextWaypoint.findAdditiveLinks();
                }
            }
        }
コード例 #2
0
ファイル: Waypoint.cs プロジェクト: tetreum/peque-traffic
 public void Start()
 {
     // run this on start as AdditiveWaypointsManager instances in Awake
     if (AdditiveWaypointsManager.Instance != null)
     {
         data.findAdditiveLinks();
     }
 }