Пример #1
0
    void Start()
    {
        FamilySystem.instance.FamilyMyDataEvent += new RequestEventHandler <int> (OnSkillExpEnevt);
        GamePlayer.Instance.OnIPropUpdate       += UpdateMoney;
        UIManager.SetButtonEventHandler(levelUpBtn.gameObject, EnumButtonEvent.OnClick, OnClickLevelUp, 0, 0);
        for (int i = 0; i < cellList.Count; i++)
        {
            UIManager.SetButtonEventHandler(cellList[i].gameObject, EnumButtonEvent.OnClick, OnClickItemCell, 0, 0);
        }

        GlobalValue.Get(Constant.C_FamilyLearnSkillPay, out _familyLearnSkillPay);
        selectCellUI = cellList[0].gameObject.GetComponent <familyZhufuCellUI> ();
        selectCellUI.selectImg.gameObject.SetActive(true);
        UpdateInfo(1);
    }
Пример #2
0
    private void OnClickItemCell(ButtonScript obj, object args, int param1, int param2)
    {
        familyZhufuCellUI cellUI = obj.gameObject.GetComponent <familyZhufuCellUI> ();

        if (cellUI == null)
        {
            return;
        }
        if (selectCellUI == null)
        {
            selectCellUI = cellUI;
        }
        else
        {
            selectCellUI.selectImg.gameObject.SetActive(false);
            selectCellUI = cellUI;
        }
        cellUI.selectImg.gameObject.SetActive(true);
        UpdateInfo(cellUI.id);
    }