Exemplo n.º 1
0
    public void Refresh()
    {
        p   = rect.localPosition;
        p.x = parent.GetPosition(v);
        rect.localPosition = p;

        color.a = parent.GetApa(v);
        if (img != null)
        {
            img.color = color;
        }

        for (int i = 0; i < imgList.Count; i++)
        {
            imgList[i].color = new Color(imgList[i].color.r, imgList[i].color.g, imgList[i].color.b, color.a);;
        }
        for (int i = 0; i < txtList.Count; i++)
        {
            txtList[i].color = new Color(txtList[i].color.r, txtList[i].color.g, txtList[i].color.b, color.a);
        }
        sv              = parent.GetScale(v);
        s.x             = sv;
        s.y             = sv;
        s.z             = 1;
        rect.localScale = s;
    }
    public void Drag(float value)
    {
        v  += value;
        p   = rect.localPosition;
        p.x = parent.GetPosition(v);
        rect.localPosition = p;

        color.a         = parent.GetApa(v);
        img.color       = color;
        sv              = parent.GetScale(v);
        s.x             = sv;
        s.y             = sv;
        s.z             = 1;
        rect.localScale = s;
    }
Exemplo n.º 3
0
    public void Drag(float value)
    {
        v  += value;
        p   = new Vector3(0, rect.transform.localPosition.y, 0);
        p.y = parent.GetPosition(v);
        rect.localPosition = new Vector3(0f, p.y, 0);

        color.a         = parent.GetApa(v);
        img.color       = color;
        sv              = parent.GetScale(v);
        s.x             = sv;
        s.y             = sv;
        s.z             = 1;
        rect.localScale = s;
    }