private void Init()
 {
     //m_DelBtn.gameObject.SetActive(false);
     UIEventListener.Get(m_DelBtn.gameObject).onClick = DelBtnClick;
     m_ShowToolTipItem = m_ShowTipCollider.gameObject.AddComponent <ShowToolTipItem_N>();
     UIEventListener.Get(m_ShowTipCollider.gameObject).onHover = ShowTipColliderOnHover;
 }
Example #2
0
    //log:lz-2016.05.04 增加mBtnCk上的悬浮提示
    void UpdateShowToolTip()
    {
        if (null == this.m_ShowToolTipItem)
        {
            this.m_ShowToolTipItem = this.mBtnCk.gameObject.AddComponent <ShowToolTipItem_N>();
        }
        int strID = 0;

        switch (m_Cmpt.Battle)
        {
        case ENpcBattle.Attack:
            strID = 10077;
            break;

        case ENpcBattle.Defence:
            strID = 10078;
            break;

        case ENpcBattle.Passive:
            strID = 10079;
            break;

        case ENpcBattle.Evasion:
            break;

        case ENpcBattle.Stay:
            strID = 10076;
            break;
        }
        if (0 != strID)
        {
            this.m_ShowToolTipItem.mStrID = strID;
        }
    }