当前位置: 首页>>代码示例>>C#>>正文


C# Device.setType方法代码示例

本文整理汇总了C#中Device.setType方法的典型用法代码示例。如果您正苦于以下问题:C# Device.setType方法的具体用法?C# Device.setType怎么用?C# Device.setType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Device的用法示例。


在下文中一共展示了Device.setType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

	//string Informacion="3:1:35:2.7:Conserje;4:2:42.93:2.34:Marico;4:2:42.1:3.6:Marico";
	// Use this for initialization

	void Start () {
		//description= GameObject.FindGameObjectWithTag("textin").GetComponent<InputField>(); //Create a tag in InputFiel
		hacercola = false;
		position = 0;
		List<Device> listdevices = new List<Device>();
		Device a = new Device();
		a.setIdentification(2);
		a.setType(1);
		a.setLatitude(41.2712);
		a.setLongitude (1.9865);
		a.setDescription("Dinamico creado");
		listdevices.Add(a);
		Device a2 = new Device();
		a2.setIdentification(3);
		a2.setType(3);
		a2.setLatitude(41.2782);
		a2.setLongitude (1.9866);
		a2.setDescription("Dinamico creado2555555555555");
		listdevices.Add(a2);
		newObject(listdevices);

		//newObject();


	}
开发者ID:ropnom,项目名称:UnityServerSocket,代码行数:28,代码来源:createObject.cs

示例2: Start

	// Use this for initialization
	void Start () {
		listdevices = new List<Device>();	
		mydevice = new Device ();
		mydevice.setType (4);
		mydevice.setLatitude (41.278);
		mydevice.setLongitude (1.984);
		mydevice.setDescription ("Cliente Unity");
		_t1 = new Thread(Socketfunction);
		_t1.Start ();
	}
开发者ID:ropnom,项目名称:UnityServerSocket,代码行数:11,代码来源:SocketClient.cs

示例3: ProcesarData

	static void ProcesarData(){
		string mesage = readSocket ();
		Debug.Log ("--> Procesando Datos llegados");
		string[] data = mesage.Split (';');
		string[] data2;

		try {
			data = mesage.Split(';');
			Debug.Log ("-->Data: "+data[0]);
			Debug.Log ("-->Usuarios: "+(data.Length-2));

			for (int j = 2; j < data.Length-1; j++) {
				Debug.Log ("-->Data: "+data[j]);
				data2 = data[j].Split(':');
				Device a = new Device();

				//Debug.Log ("-->Aqui llega 1 j: "+j);
				a.setIdentification(Convert.ToInt32(data2[0]));
				a.setType(Convert.ToInt32(data2[1]));
				//Debug.Log ("-->Aqui llega 2");
				a.setLatitude(Convert.ToDouble(data2[2]));
				a.setLongitude(Convert.ToDouble(data2[3]));
				//Debug.Log ("-->Aqui llega 3");
				a.setDescription(data2[4]);
				listdevices.Add(a);
				etapa = 3;
			}
			//Hacer que los devices se pongna en el mapa  ** Con ANA **
			Debug.Log ("--> Datos procesados son: "+listdevices.Count);

			//Debug.Log ("-->Aqui llega 4");
			creator.putCola(listdevices);


		} catch (Exception e) {
			// printamos posibles excepciones
			Debug.Log ("*** Catch: "+e.ToString());
			etapa = -1;

		}
	}
开发者ID:ropnom,项目名称:UnityServerSocket,代码行数:41,代码来源:SocketClient.cs


注:本文中的Device.setType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。