Exemplo n.º 1
0
        /// <summary>
        /// 表示
        /// </summary>
        public void Visible()
        {
            if (visibled)
            {
                return;
            }

            //有効化
            if (!gameObject.activeInHierarchy)
            {
                gameObject.SetActive(true);
            }

            //フラグメントの設定
            circle.SetRange(startAngle, endAngle);
            circle.SetRadius(innerRadius, outerRadius);
            circle.SetOptions(indicateT, density, normalColor);
            circle.SetIndicate(CircleFragment.Indicate.Visible, rangeIndicate, radiusIndicate);

            //スプライトの表示
            if (lerpSprite != null)
            {
                lerpSprite.SetTargetAlpha(1f);
            }

            visibled = true;
        }
Exemplo n.º 2
0
    /// <summary>
    /// 表示
    /// </summary>
    public void Visible(float start, float end, float inner, float outer)
    {
        //フラグメントの表示
        if (frag == null)
        {
            frag = new CircleFragment();
        }
        frag.SetRange(start, end);
        frag.SetRadius(inner, outer);
        frag.SetOptions(indicateT, density, normalColor);
        frag.SetIndicate(CircleFragment.Indicate.Visible, range, radius);

        //スプライトの表示
        if (lerpSprite != null)
        {
            lerpSprite.SetAlphas(0f, 1f);
        }

        visibled = true;
    }
Exemplo n.º 3
0
    private void Start()
    {
        fragments = new List <CircleFragment>();
        float deltaAngle = 360f / num;

        for (int i = 0; i < num; ++i)
        {
            CircleFragment fragment = new CircleFragment();
            float          start    = deltaAngle * i;
            fragment.SetRange(start, start + deltaAngle);
            fragment.SetRadius(4f, 4.1f);
            fragment.SetOptions(10f, 1f, colors.Evaluate((float)i / num));
            fragments.Add(fragment);
        }

        for (int i = 0; i < fragments.Count; ++i)
        {
            fragments[i].SetIndicate(CircleFragment.Indicate.Visible, CircleFragment.RangeIndicate.StartToEnd, CircleFragment.RadiusIndicate.Fixed);
        }
    }