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; } }
void OnInsetPackageGridDrag(int newGrid, int oldGrid) { if (InsetUIDict.INSETPACKAGEGRIDDRAG != null) { InsetUIDict.INSETPACKAGEGRIDDRAG(newGrid, oldGrid); } }
void OnInsetDialogDiamondTipInsetUp(int i) { if (InsetUIDict.INSETDIALOGDIAMONDTIPINSETUP != null) { InsetUIDict.INSETDIALOGDIAMONDTIPINSETUP(i); } }
void OnInsetPackageGridDragBegin(int ID) { if (InsetUIDict.INSETPACKAGEGRIDDRAGBEGIN != null) { InsetUIDict.INSETPACKAGEGRIDDRAGBEGIN(ID); } }
void OnInsetHoleUpdateUp(int ID) { if (InsetUIDict.INSETDIAMONDUPDATEUP != null) { InsetUIDict.INSETDIAMONDUPDATEUP(ID); } }
void OnInsetHoleUnLoadUp(int ID) { if (InsetUIDict.INSETDIAMONDUNLOADUP != null) { InsetUIDict.INSETDIAMONDUNLOADUP(ID); } }
void OnInsetHoleUpDouble(int ID) { if (InsetUIDict.INSETDIAMONDGRIDUPDOUBLE != null) { InsetUIDict.INSETDIAMONDGRIDUPDOUBLE(ID); } }
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); }