public void init() { this._onInit(); foreach (var item in this.GetType().GetFields()) { VOBase vo = this.GetType().GetField(item.Name).GetValue(this) as VOBase; if (vo != null) { vo.init(); } } }
public void Show(VOBase vo) { _itemVo = (ItemVO)vo; if (vo == null) { Clear(); return; } _imgIcon.sprite = Resources.Load <Sprite>(_itemVo.config.icon); itemIcon.SetActive(true); _txtCount.text = _itemVo.config.limit > 1 ? _itemVo.count.ToString():""; }
public void showTips(BaseResource config, VOBase vo) { _config = config; _vo = vo; if (config == null && vo != null) { _config = (BaseResource)vo.GetType().GetProperty("config").GetValue(vo); } if (_config == null) { return; } _showTips(); }