Exemple #1
0
    void OnPress(bool isPressed)
    {
        if (!isPressed)
        {
            if (!m_bIsDragging)
            {
                InsetUIDict.INSETUIPACKAGEGRIDUP(ID);
            }
            else
            {
                if (Physics.Raycast(m_relatedCam.ScreenPointToRay(Input.mousePosition), out m_rayHit, 10000.0f))
                {
                    if (m_rayHit.transform.GetComponentsInChildren <InsetUIButton>(true).Length > 0)
                    {
                        int id = m_rayHit.transform.GetComponentsInChildren <InsetUIButton>(true)[0].ID;

                        EventDispatcher.TriggerEvent <int, int>("InsetUIPackageGridDrag", id, m_iDragStartID);
                    }
                }
            }
            m_bIsDragging  = false;
            m_bIsDragBegin = false;
        }
        else
        {
            m_iDragStartID = ID;
        }
    }
Exemple #2
0
 void OnInsetPackageGridDrag(int newGrid, int oldGrid)
 {
     if (InsetUIDict.INSETPACKAGEGRIDDRAG != null)
     {
         InsetUIDict.INSETPACKAGEGRIDDRAG(newGrid, oldGrid);
     }
 }
Exemple #3
0
 void OnInsetDialogDiamondTipInsetUp(int i)
 {
     if (InsetUIDict.INSETDIALOGDIAMONDTIPINSETUP != null)
     {
         InsetUIDict.INSETDIALOGDIAMONDTIPINSETUP(i);
     }
 }
Exemple #4
0
 void OnInsetPackageGridDragBegin(int ID)
 {
     if (InsetUIDict.INSETPACKAGEGRIDDRAGBEGIN != null)
     {
         InsetUIDict.INSETPACKAGEGRIDDRAGBEGIN(ID);
     }
 }
Exemple #5
0
 void OnInsetHoleUpdateUp(int ID)
 {
     if (InsetUIDict.INSETDIAMONDUPDATEUP != null)
     {
         InsetUIDict.INSETDIAMONDUPDATEUP(ID);
     }
 }
Exemple #6
0
 void OnInsetHoleUnLoadUp(int ID)
 {
     if (InsetUIDict.INSETDIAMONDUNLOADUP != null)
     {
         InsetUIDict.INSETDIAMONDUNLOADUP(ID);
     }
 }
Exemple #7
0
 void OnInsetHoleUpDouble(int ID)
 {
     if (InsetUIDict.INSETDIAMONDGRIDUPDOUBLE != null)
     {
         InsetUIDict.INSETDIAMONDGRIDUPDOUBLE(ID);
     }
 }
Exemple #8
0
 void OnInsetHoleUp(int ID)
 {
     if (InsetUIDict.INSETDIAMONDGRIDUP != null)
     {
         InsetUIDict.INSETDIAMONDGRIDUP(ID);
     }
 }
 public void FakeClick()
 {
     InsetUIDict.INSETUIEQUIPMENTGRIDUP(id);
 }
    // 为去除警告暂时屏蔽以下代码
    //bool m_bIsDragging = false;

    //void OnDrag()
    //{
    //    m_bIsDragging = true;
    //}


    //void OnPress(bool isPressed)
    //{
    //    Mogo.Util.LoggerHelper.Debug("Pressed");
    //    if (!isPressed)
    //    {
    //        if (!m_bIsDragging)
    //        {
    //            InsetUIDict.INSETUIEQUIPMENTGRIDUP(id);
    //        }
    //        m_bIsDragging = false;
    //    }
    //}

    void OnClick()
    {
        InsetUIDict.INSETUIEQUIPMENTGRIDUP(id);
    }