Пример #1
0
    // Fill the PersonaCard with personaINFO, located in the huis-van-morgen.json
    public void FillPersonaCard(PersonaInfo persona)
    {
        this.persona = persona;

        this.personaName.text      = persona.getFullName();
        this.personaBiography.text = persona.biography;

        Rect  a      = this.personaBiography.rectTransform.rect;
        float height = persona.biography.Length * 1.25f;

        this.personaBiography.rectTransform.sizeDelta = new Vector2(a.width, height);
        Vector3 b = this.personaBiography.rectTransform.transform.position;

        b.y = -(height / 2);
        this.personaBiography.rectTransform.transform.position = b;


        this.personaAge.text     = persona.age.ToString();
        this.personaImage.sprite = Resources.Load <Sprite>(persona.mugshotPath);
        this.personaImage.color  = Color.white;

        string limitations = "";

        foreach (string limit in persona.limitations)
        {
            limitations += limit + "\n";
        }
        this.personaLimitation.text = limitations;
    }
Пример #2
0
 private void Start()
 {
     button.GetComponentInChildren <Text>().text = "Selecteer " + persona.getFullName();
 }