Exemplo n.º 1
0
    private void GetArtifactInfo(string id)
    {
        string d = "";

        if (PlayerPrefs.GetString("localization") == "ilocano")
        {
            d    = "Nangited";
            date = "Naala idi tawen ";
        }
        else
        {
            d    = "Donated by";
            date = "Date Acquired ";
        }
        list          = ArtmoLoader.GetDetails(Convert.ToInt32(id));
        txtGTerm.text = list[3];
        txtName.text  = list[2];

        txtDonor.text = (list[5].Length > 1)?d + " : " + list[5]:"";
        date          = date + " " + list[6].Substring(0, 4);
        if (date.Contains("0001"))
        {
            date = "";
        }
        txtDescription.text = "\t" + list[4] + " " + date;
        var       img  = Convert.FromBase64String(list[1]);
        Texture2D text = new Texture2D(2, 2);

        text.LoadImage(img);
        Sprite sprite = Sprite.Create(text, new Rect(0, 0, text.width, text.height), new Vector2(.5f, .5f));

        sprite.name = "artifactImage";
        artifactImage.GetComponent <Image>().sprite = sprite;
    }