public override void Awake() { base.Awake(); var t = controller.transform; mName = t.GetComponent <UILabel>("DataPanel/Item/Name"); mNumLabel = t.GetComponent <UILabel>("DataPanel/Item/Num"); mUseNumLabel = t.GetComponent <UILabel>("DataPanel/Use/Adjust/UseNum"); mIcon = t.GetComponent <DynamicUISprite>("DataPanel/Item/Icon"); mFrame = t.GetComponent <UISprite>("DataPanel/Item/Icon/LvlBorder"); mFrameBG = t.GetComponent <UISprite>("DataPanel/Item/Icon/FrameBG"); mReduceBtnMask = t.FindEx("DataPanel/Use/Adjust/Reduce/ReduceMask").gameObject; mAddBtnMask = t.FindEx("DataPanel/Use/Adjust/Add/AddMask").gameObject; mReduceBtn = t.GetComponent <UIButton>("DataPanel/Use/Adjust/Reduce"); mAddBtn = t.GetComponent <UIButton>("DataPanel/Use/Adjust/Add"); mUseBtn = t.GetComponent <UIButton>("DataPanel/Use/OkUse"); mMaxBtn = t.GetComponent <UIButton>("DataPanel/Use/Adjust/Max"); mUseRequest = t.GetComponent <UIServerRequest>("DataPanel/Use"); dataLookup = t.GetDataLookupILRComponent <ItemUseDataLookup>(); mEquipSuitIcon = t.GetComponent <DynamicUISprite>("DataPanel/Item/Icon/EquipSuitIcon"); mboxGradeNumLab = t.GetComponent <UILabel>("DataPanel/Item/Icon/BoxGradeNum"); controller.backButton = t.GetComponent <UIButton>("DataPanel/CloseBtn"); mMaxBtn.onClick.Add(new EventDelegate(OnMaxClick)); mUseBtn.onClick.Add(new EventDelegate(OnUse)); t.GetComponent <ContinuePressTrigger>("DataPanel/Use/Adjust/Reduce").m_CallBackPress.Add(new EventDelegate(OnReduceClick)); t.GetComponent <ContinuePressTrigger>("DataPanel/Use/Adjust/Add").m_CallBackPress.Add(new EventDelegate(OnAddClick)); t.GetComponent <UIServerRequest>("DataPanel/Use").onResponse.Add(new EventDelegate(controller, "OnFetchData")); }