void selectTimeChangeDelegate(Fashion_OBB_item_selectTime selectTIme) { // TODO: on the select time change... OnSelectDayChange(selectTIme.selectIndex); if (_onItemChangeDelegate != null) { _onItemChangeDelegate(this); } }
void Awake() { _icon = transform.FindChild("icon").GetComponent <UISprite>(); _nameLabel = transform.FindChild("name").GetComponent <UILabel>(); _costTypeSprite = transform.FindChild("cost/costType").GetComponent <UISprite>(); _costNumLabel = transform.FindChild("cost/costNum").GetComponent <UILabel>(); _timeSelectFatherGO = transform.FindChild("qixian/timeSelectFather").gameObject; _checkBoxBtn = transform.FindChild("checkBox").GetComponent <UIButton>(); UIEventListener.Get(_checkBoxBtn.gameObject).onClick = OnCheckBoxClick; GameObject selectTimeItemGO = ResourceLoadManager.Instance.LoadPrefab("Prefab/GUI/Fashion_OBB_item_selectTime") as GameObject; _timeSelectGO = CommonFunction.InstantiateObject(selectTimeItemGO, _timeSelectFatherGO.transform); _selectTimeScript = _timeSelectGO.GetComponent <Fashion_OBB_item_selectTime>(); _selectTimeScript._selectTimeChangeDelegate = selectTimeChangeDelegate; _selectTimeScript._onDropDownDelegate = _onDropDownDelegate; _selectSprite = transform.FindChild("checkBox").FindChild("select").GetComponent <UISprite>(); }