コード例 #1
0
// Use this for initialization
void Start () 
{
	
	
	MyPosition = GameObject.FindGameObjectWithTag("Gps").GetComponent<GpsWithoutUi>();
	
	switch (color)
	{
	case ObjectColor.Red:
		gameObject.GetComponent<MeshRenderer>().material.color = Color.red;
		break;
	case ObjectColor.Blue:
		gameObject.GetComponent<MeshRenderer>().material.color = Color.blue;
		break;
	case ObjectColor.Green:
		gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
		break;
	case ObjectColor.Yellow:
		gameObject.GetComponent<MeshRenderer>().material.color = Color.yellow;
		break;
	default:
		break;
	}
	
	//Aqui voy a poner la distancia en lugar del nombre
	gameObject.GetComponentInChildren<TextMesh>().text = description;
	
	float z = (float)PositionUtilities.DrawCubeY(latitude);
	float x = (float)PositionUtilities.DrawCubeX(longitude);
	
	gameObject.transform.position = new Vector3(x, 0, z);
	
	
}
コード例 #2
0
ファイル: Cam.cs プロジェクト: ropnom/UnityServerSocket
    void Awake()
    {
        gps = GameObject.FindGameObjectWithTag("Gps").GetComponent<GpsWithoutUi>();
        cm = GameObject.FindGameObjectWithTag("Ui").GetComponent<CanvasManager>();
        PositionUtilities.Init();


    }
コード例 #3
0
	void Awake()
	{
		gps = GameObject.FindGameObjectWithTag("Gps").GetComponent<GpsWithoutUi>();
	}
コード例 #4
0
	void Awake()
	{
		gps = GameObject.FindGameObjectWithTag("Gps").GetComponent<GpsWithoutUi>();
		creator= GameObject.FindGameObjectWithTag("creador").GetComponent<createObject>();
	}