Ejemplo n.º 1
0
    public void fadeAll(Transform parent, ALPHA alpha, DURATION duration, Dictionary <string, ALPHA> ignoreDic = null, bool isSetRaycastTarget = true, bool ignoreTimescale = false)
    {
        ALPHA targetAlpha = alpha;

        if (ignoreDic != null)
        {
            if (ignoreDic.ContainsKey(parent.name))
            {
                targetAlpha = ignoreDic[parent.name];
            }
        }
        checkTargetHasImageOrText(parent, (Graphic graphic) => {
            graphic.CrossFadeAlpha(alphaDic[targetAlpha], durationDic[duration], ignoreTimescale);
            if (isSetRaycastTarget)
            {
                setRaycastTarget(graphic, targetAlpha);
            }
        });
        if (parent.childCount > 0)
        {
            for (int i = 0; i < parent.childCount; i++)
            {
                if (parent.GetChild(i).gameObject.activeSelf)
                {
                    fadeAll(parent.GetChild(i), targetAlpha, duration, ignoreDic, isSetRaycastTarget, ignoreTimescale);
                }
            }
        }
    }
Ejemplo n.º 2
0
 public void fadeTarget(Graphic target, ALPHA alpha, DURATION duration, bool isSetRayCastTarget = true, bool ignoreTimescale = false)
 {
     target.CrossFadeAlpha(alphaDic[alpha], durationDic[duration], ignoreTimescale);
     if (isSetRayCastTarget)
     {
         setRaycastTarget(target, alpha);
     }
 }
Ejemplo n.º 3
0
 public void setAlphaTarget(Transform target, ALPHA alpha, bool isSetRaycastTarget = true)
 {
     checkTargetHasCanvasRenderer(target, (CanvasRenderer canvasRenderer) => {
         canvasRenderer.SetAlpha(alphaDic[alpha]);
     });
     if (isSetRaycastTarget)
     {
         checkTargetHasImageOrText(target, (Graphic graphic) => {
             setRaycastTarget(graphic, alpha);
         });
     }
 }
Ejemplo n.º 4
0
    public void setAlphaAll(Transform parent, ALPHA alpha, Dictionary <string, ALPHA> ignoreDic = null, bool isSetRaycastTarget = true)
    {
        ALPHA targetAlpha = alpha;

        if (ignoreDic != null)
        {
            if (ignoreDic.ContainsKey(parent.name))
            {
                targetAlpha = ignoreDic[parent.name];
            }
        }
        setAlphaTarget(parent, targetAlpha, isSetRaycastTarget);
        if (parent.childCount > 0)
        {
            for (int i = 0; i < parent.childCount; i++)
            {
                if (parent.GetChild(i).gameObject.activeSelf)
                {
                    setAlphaAll(parent.GetChild(i), targetAlpha, ignoreDic, isSetRaycastTarget);
                }
            }
        }
    }
Ejemplo n.º 5
0
 // 투명도가 100%인 경우만 RaycastTarget으로 설정한다.
 private void setRaycastTarget(Graphic target, ALPHA alpha) => target.raycastTarget = alpha == ALPHA.MAX;
Ejemplo n.º 6
0
 public void flashTargetAlpha(Graphic target, ALPHA alpha, float duration, int count)
 {
     StartCoroutine(flashTarget(target, alphaDic[alpha], duration, count));
 }
Ejemplo n.º 7
0
        private ALPHA decode_ALPHA()
        {
            push("ALPHA");

            bool decoded = true;
            int s0 = index;
            var e0 = new List<Rule>();
            Rule rule;

            decoded = false;
            if (!decoded)
            {
                {
                    var e1 = new List<Rule>();
                    int s1 = index;
                    decoded = true;
                    if (decoded)
                    {
                        bool f1 = true;
                        int c1 = 0;
                        for (int i1 = 0; i1 < 1 && f1; i1++)
                        {
                            rule = decode_NumericValue("%x41-5A", "[\\x41-\\x5A]", 1);
                            if ((f1 = rule != null))
                            {
                                e1.Add(rule);
                                c1++;
                            }
                        }
                        decoded = c1 == 1;
                    }
                    if (decoded)
                        e0.AddRange(e1);
                    else
                        index = s1;
                }
            }
            if (!decoded)
            {
                {
                    var e1 = new List<Rule>();
                    int s1 = index;
                    decoded = true;
                    if (decoded)
                    {
                        bool f1 = true;
                        int c1 = 0;
                        for (int i1 = 0; i1 < 1 && f1; i1++)
                        {
                            rule = decode_NumericValue("%x61-7A", "[\\x61-\\x7A]", 1);
                            if ((f1 = rule != null))
                            {
                                e1.Add(rule);
                                c1++;
                            }
                        }
                        decoded = c1 == 1;
                    }
                    if (decoded)
                        e0.AddRange(e1);
                    else
                        index = s1;
                }
            }

            rule = null;
            if (decoded)
                rule = new ALPHA(text.Substring(s0, index - s0), e0);
            else
                index = s0;

            pop("ALPHA", decoded, index - s0);

            return (ALPHA)rule;
        }
Ejemplo n.º 8
0
 public ALPHA(ALPHA rule)
     : base(rule.spelling, rule.rules)
 {
 }