示例#1
0
 public void Start()
 {
     Instance = this;
     DontDestroyOnLoad(gameObject);
     PopulateList();
     StartCoroutine(GetCoordinates());
 }
示例#2
0
	private void Start()
	{
		webcamDeviceIndex = GetMainWebcam();
		webcam = new WebCamTexture(WebCamTexture.devices[webcamDeviceIndex].name, Screen.width, Screen.height, 30);
		webcam.Play();
		StartCoroutine(InitArCamera());
		position = new ARLocation(new GeoCoordinate());
		ToolBox.Instance.sensorManager.gps.AddObserver(this);
		ToolBox.Instance.sensorManager.orientation.AddObserver(this);
	}
示例#3
0
	public void Init(Element element)
	{
		id = element.id;
		name = element.title;
		if (element.ratio != null)
		{
			scale = float.Parse(element.ratio);
		}
		if (element.transparency != null)
		{
			opacity = float.Parse(element.transparency);
		}
		if (element.orientation != null)
		{
			orientation = float.Parse(element.orientation);
		}
		if (element.latitude != null || element.longitude != null || element.elevation != null)
		{
			GeoCoordinate temp = new GeoCoordinate(float.Parse(element.latitude), float.Parse(element.longitude), float.Parse(element.elevation));
			location = new ARLocation(temp);
		}
	}