Exemplo n.º 1
0
        public static void CaptureItemUI(TSSItem item, ItemKey key)
        {
            if (item.canvasGroup != null)
            {
                item.values.alphas[(int)key] = item.canvasGroup.alpha;
            }
            else if (item.image != null)
            {
                item.values.alphas[(int)key]     = item.image.color.a;
                item.values.colors[(int)key]     = item.image.color;
                item.values.imageFills[(int)key] = item.image.fillAmount;
            }
            else if (item.rawImage != null)
            {
                item.values.alphas[(int)key] = item.rawImage.color.a;
                item.values.colors[(int)key] = item.rawImage.color;
            }
            else if (item.text != null)
            {
                item.values.alphas[(int)key] = item.text.color.a;
                item.values.colors[(int)key] = item.text.color;
                item.values.texts[(int)key]  = item.text.text;

                TSSText.Parse(item.text.text, out item.values.numbers[(int)key], out item.stringPart);
            }
        }