Exemplo n.º 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);
	
	
}
Exemplo n.º 2
0
    void Awake()
    {
        gps = GameObject.FindGameObjectWithTag("Gps").GetComponent<GpsWithoutUi>();
        cm = GameObject.FindGameObjectWithTag("Ui").GetComponent<CanvasManager>();
        PositionUtilities.Init();


    }
Exemplo n.º 3
0
	void Awake()
	{
		gps = GameObject.FindGameObjectWithTag("Gps").GetComponent<GpsWithoutUi>();
	}
Exemplo n.º 4
0
	void Awake()
	{
		gps = GameObject.FindGameObjectWithTag("Gps").GetComponent<GpsWithoutUi>();
		creator= GameObject.FindGameObjectWithTag("creador").GetComponent<createObject>();
	}