Esempio n. 1
0
 public void SetStyle(ItemInfoStyle st, Text text)
 {
     text.font      = st.font;
     text.fontSize  = st.fontSize;
     text.fontStyle = st.fontStyle;
     text.color     = st.color;
     text.alignment = st.anchor;
 }
Esempio n. 2
0
        public GameObject CreateText(ItemInfoStyle style, GameObject parent, string text)
        {
            GameObject label     = new GameObject();
            Text       labeltext = label.AddComponent <Text>();

            SetStyle(style, labeltext);
            labeltext.text = text;
            label.transform.SetParent(parent.transform);
            label.transform.localScale = new Vector3(1, 1, 1);
            label.transform.position   = Vector3.zero;

            return(label);
        }