示例#1
0
    //****************************************************************************************************
    //
    //****************************************************************************************************

    public void OnDestroy()
    {
        if (m_instance == this)
        {
            m_instance = null;
        }
    }
示例#2
0
    //****************************************************************************************************
    //
    //****************************************************************************************************

    public void OnPOPUPColorButon(POPUPColor popup, POPUPColor.BUTON buton)
    {
        if (buton == POPUPColor.BUTON.OK)
        {
            if (m_options != null)
            {
                m_options.m_colorBgnds = popup.color;
            }
        }
    }
示例#3
0
    //****************************************************************************************************
    //
    //****************************************************************************************************

    public void Awake()
    {
        if (m_instance == null)
        {
            m_instance = this;
        }

        m_group = GetComponent <CanvasGroup>();

        GameObject root = GameObject.Find("POPUPColor");

        GameObject buts = CORE.HIERARCHY.Find(root, "Butons");

        m_tint = CORE.HIERARCHY.FindComp <UnityEngine.UI.RawImage>(root, "Hue");

        m_hue = CORE.HIERARCHY.FindComp <UnityEngine.UI.RawImage>(root, "HueSelection");

        m_tintCursor = CORE.HIERARCHY.FindComp <UnityEngine.UI.RawImage>(root, "TintCursor");

        m_hueCursor = CORE.HIERARCHY.FindComp <UnityEngine.UI.RawImage>(root, "HueCursor");

        m_preview = CORE.HIERARCHY.FindComp <UnityEngine.UI.RawImage>(root, "Preview");

        m_CANCEL = CORE.HIERARCHY.FindComp <UnityEngine.UI.Button>(buts, "CANCEL");

        m_OK = CORE.HIERARCHY.FindComp <UnityEngine.UI.Button>(buts, "OK");


        m_tintPicker = new UIRectCoord(m_tint.rectTransform, Vector2.one * 4.0f);

        m_huePicker = new UIRectCoord(m_hue.rectTransform, new Vector2(0.0f, 2.0f));


        if (m_CANCEL != null)
        {
            m_CANCEL.onClick.RemoveAllListeners(); m_CANCEL.onClick.AddListener(delegate { OnCANCEL(); });
        }

        if (m_OK != null)
        {
            m_OK.onClick.RemoveAllListeners();     m_OK.onClick.AddListener(delegate { OnOK(); });
        }


        m_fade.Begin(FADE_TYPE.FADE_OUT, 0.0f);

        gameObject.SetActive(false);
    }