public void ClickButton() { if (SkillRootLogic.Instance() != null) { SkillRootLogic.Instance().SelectSkillIndex = m_nSkillIndex; if (SkillRootLogic.Instance().CurClickBtItem != null) { SkillRootLogic.Instance().CurClickBtItem.m_SkillBakSprite.spriteName = "CommonBack6Nor"; SkillRootLogic.Instance().CurClickBtItem.m_SkillBakSprite.MakePixelPerfect(); } m_SkillBakSprite.spriteName = "CommonBack6Hov"; m_SkillBakSprite.MakePixelPerfect(); SkillRootLogic.Instance().CurClickBtItem = this; if (m_nSkillIndex != -1) //已经学习的技能 { if (SkillRootLogic.Instance().NewPlayerGuide_Step == 1 && gameObject.name == "1002") { NewPlayerGuidLogic.CloseWindow(); SkillRootLogic.Instance().NewPlayerGuide(2); } SkillRootLogic.Instance().ShowSkillInfo(); } else //未学习的技能 { SkillRootLogic.Instance().ShowNoStudySkillInfo(m_nSkillID); } } }
void ReleaseButton() { if (m_SkillIconSprite.GetComponent <UIDragObject>().enabled == false) { return; } if (SkillRootLogic.Instance() != null) { SkillRootLogic.Instance().ReleaseButtonDragSprite(m_nSkillIndex); } }
void PressButton() { if (m_SkillIconSprite.GetComponent <UIDragObject>().enabled == false) { return; } if (SkillRootLogic.Instance() != null) { UISprite DragSprite = SkillRootLogic.Instance().m_SkillButtonDragSprite; DragSprite.transform.localPosition = DragSprite.transform.parent.InverseTransformPoint(m_SkillIconSprite.transform.position); DragSprite.spriteName = m_SkillIconSprite.spriteName; DragSprite.MakePixelPerfect(); DragSprite.gameObject.SetActive(true); } }