Ejemplo n.º 1
0
    public void OnOpen(object data)
    {
        if (data == null)
        {
            Debug.LogErrorFormat("GameOverViewModule.Open(GameOverType)  is null ");
            return;
        }

        GameOverType type = (GameOverType)data;
        var          dic  = ViewTools.CollectAllGameObjects(m_gameObject);

        m_button = dic["GameOverButton"].GetComponent <Button>();
        if (m_button != null)
        {
            m_button.onClick.AddListener(OnClickButton);
        }

        m_winObj     = dic["win"];
        m_failureObj = dic["lose"];
        if (m_winObj != null)
        {
            m_winObj.SetActive(type == GameOverType.Win);
        }
        if (m_failureObj != null)
        {
            m_failureObj.SetActive(type == GameOverType.Failure);
        }
    }
Ejemplo n.º 2
0
    public void OnOpen(object data)
    {
        var dic = ViewTools.CollectAllGameObjects(m_gameObject);

        m_button = dic["Button"].GetComponent <Button>();
        if (m_button != null)
        {
            m_button.onClick.AddListener(OnClickButton);
        }
    }
Ejemplo n.º 3
0
    public void OnOpen(object data)
    {
        var dic = ViewTools.CollectAllGameObjects(m_gameObject);

        m_scroll = dic["HpScroll"].GetComponent <UIHPScroll>();
        if (m_scroll != null)
        {
            m_scroll.OnOpen(data);
        }

        m_hitMask = dic["HitMask"].GetComponent <UIHitMask>();
        if (m_hitMask != null)
        {
            m_hitMask.OnOpen(data);
        }

        m_joy = dic["MoveJoy"].GetComponentInChildren <ScrollCircle>();
        if (m_joy != null)
        {
            ScrollCircle.On_JoyTouchStart += OnMoveStart;
            ScrollCircle.On_JoyTouching   += OnMoving;
            ScrollCircle.On_JoyTouchEnd   += OnMoveEnd;
        }
    }