Beispiel #1
0
 static void ShowUIOver(bool bSuccess, object param)
 {
     if (bSuccess)
     {
         List <object> initParams = param as List <object>;
         if (PopMenuLogic.Instance() != null && initParams != null && initParams.Count > 1)
         {
             PopMenuLogic.Instance().ShowPopMenu((string)initParams[0], (GameObject)initParams[1]);
         }
     }
 }
    //void SetTargetFrameTweenAlpha()
    //{
    //    if (m_bFold)
    //    {
    //        if (!m_hasTarget)
    //        {
    //            m_FoldTween.Reset();
    //            m_FoldTween.from = 0;
    //            m_FoldTween.to = 0;
    //            m_TargetFrameBoxColliser.enabled = false;
    //            m_FoldTween.Play();
    //        }
    //        else
    //        {
    //            m_FoldTween.Reset();
    //            m_FoldTween.from = 1;
    //            m_FoldTween.to = 0;
    //            m_TargetFrameBoxColliser.enabled = false;
    //            m_FoldTween.Play();
    //        }
    //    }
    //    else
    //    {
    //        if (!m_hasTarget)
    //        {
    //            m_FoldTween.Reset();
    //            m_FoldTween.from = 0;
    //            m_FoldTween.to = 0;
    //            m_TargetFrameBoxColliser.enabled = false;
    //            m_FoldTween.Play();
    //        }
    //        else
    //        {
    //            m_FoldTween.Reset();
    //            m_FoldTween.from = 0;
    //            m_FoldTween.to = 1;
    //            m_TargetFrameBoxColliser.enabled = true;
    //            m_FoldTween.Play();
    //        }
    //    }
    //}

    //点击头像弹出菜单
    void OnClickTargetFrame()
    {
        //只有玩家可以弹出菜单,所以发现guid非法则不弹
        if (m_TargetGuid == GlobeVar.INVALID_GUID || m_strTargetName == "")
        {
            return;
        }

        //显示则点击消失,隐藏则点击显示
        if (PopMenuLogic.Instance() == null && m_HpInfo.m_TargetHPSprite != null)
        {
            //PopMenuLogic.ShowMenu("TargetFramePopMenu", m_TargetHeadSprite.gameObject);
            PopMenuLogic.ShowMenu("TargetFramePopMenu", m_HpInfo.m_TargetHPSprite.gameObject);
            return;
        }
        else
        {
            UIManager.CloseUI(UIInfo.PopMenuRoot);
        }
    }