Example #1
0
    public void Funcion_AbrirPanelConDatos(GameObject ciudadd)
    {
        ciudadRef = ciudadd;
        CiudadObject ciudadObject = ciudadd.GetComponent <CiudadObject>();

        ciudad            = ciudadObject.miCiudad;
        txtNombre.text    = ciudad.Nombre;
        txtPoblacion.text = ciudad.Poblacion + " habitantes.";
        txtIngresos.text  = "+" + ciudad.Ingresos + "/mes $";

        imageDatos.SetActive(true);
        //Debug.Log("funcion abrir panel con datos");
    }
Example #2
0
 public void Start()
 {
     //Ingresos = Poblacion * 3;  //ya se hace en el class
     miCiudad = new Clases.Ciudad(Nombre, Poblacion, Ingresos, Pais);
 }