Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        locationService            = Input.location;
        locationCoordination       = ScriptableObject.CreateInstance <LocationCoordination>();
        distanceCalculator         = gameObject.GetComponent <DistanceCalculator>();
        googleMapDrawer            = GameObject.FindGameObjectWithTag("MapDrawer").GetComponent <GoogleMapDrawer>();
        spotManager                = GameObject.FindGameObjectWithTag("SpotManager").GetComponent <SpotManager>();
        googleMapDrawer.Calculator = locationCoordination;
        //ロケーションサービスが無効、かつユーザーが許可しているなら
        //ロケーションサービスを有効化
        switch (Application.platform)
        {
        case RuntimePlatform.Android:
        case RuntimePlatform.IPhonePlayer:
            isMobilePlatform = true;
            break;
        }
        if (isMobilePlatform)
        {
            switch (locationService.status)
            {
            case LocationServiceStatus.Stopped:
                LocationUpdate();
                break;

            default:
                break;
            }
        }
        else
        {
            locationCoordination.SetCoordination(initlong, initlat);
        }
    }
 // Use this for initialization
 void Start()
 {
     if (calculator == null)
     {
         //検索用のLocationCoordinationの参照を
         //渡す
         calculator = GameObject.FindGameObjectWithTag("Locator").GetComponent <Locator>().locationCoordination;
         BuildMap();
     }
 }
Esempio n. 3
0
 private void Start()
 {
     ref_locationCoordination = GameObject.FindGameObjectWithTag("Locator").GetComponent <Locator>().locationCoordination;
     WalkingSpeedPerHour     *= 1000.0f;
     RunningSpeedPerHour     *= 1000.0f;
 }