예제 #1
0
    void Start()
    {
        source = gameObject.AddComponent <AudioSource>();
        nextButton.onClick.AddListener(delegate() {
            waypoints.ForceNextWaypoint();
        });
        locationManager = new LocationManager();

        List <Waypoint> _waypoints = new List <Waypoint>(GameObject.FindObjectsOfType <Waypoint>());

        _waypoints.Sort(delegate(Waypoint go1, Waypoint go2) {
            return(go1.transform.GetSiblingIndex().CompareTo(go2.transform.GetSiblingIndex()));
        });
        waypoints = new Waypoints(_waypoints.ToArray());
        corners   = waypoints.Corners;
        StartCoroutine(GetAireasData());
    }