Ejemplo n.º 1
0
 private void OnClickUpgradeItem(EventContext context)
 {
     if (mData.CanUpgrade())
     {
         mData.Upgrade();
         UIManager.mEventDispatch.DispatchEvent(EventDefine.UPDATE_EQUIPMENT_UI);
         Process.Instance.Saved();
     }
 }
Ejemplo n.º 2
0
    public void UpdateUI(int equipmentId)
    {
        mData = Process.Instance.Player.ReqEquipment(equipmentId);
        //title
        mBtnTitleText.text = mData.ConfigData._name;
        bool canCompose = mData.CanUpgrade();

        if (canCompose)
        {
            mBtnTitleText.color = Color.green;
        }
        else
        {
            mBtnTitleText.color = mData.Count > 0 ? Color.white : Color.gray;
        }
        mBtnTitle.enabled = canCompose ? true : false;

        //material
        mCount.text = "所需材料:" + mData.GetMaterialDesc();
        mDesc.text  = "效果:" + mData.ConfigData._desc;
    }