public override void SetGridData(object data) { base.SetGridData(data); if (data is UISkillGridData) { m_data = (UISkillGridData)data; OnShowUI(); } }
void OnPetGridDataUpdate(UIGridBase data, int index) { if (data is UISkillGrid) { UISkillGrid grid = data as UISkillGrid; if (m_lst_PetSkill != null && index < m_lst_PetSkill.Count) { UISkillGridData paras = new UISkillGridData() { skillid = m_lst_PetSkill[index].id, skillType = 1, level = m_lst_PetSkill[index].lv }; grid.SetGridData(paras); } } if (data is UIPetRideGrid) { UIPetRideGrid grid = data as UIPetRideGrid; if (m_lstPetData != null && index < m_lstPetData.Count) { grid.SetGridData(m_lstPetData[index]); } } }
void OnRidtGridDataUpdate(UIGridBase data, int index) { if (data is UIPetRideGrid) { UIPetRideGrid grid = data as UIPetRideGrid; if (m_lstRideData != null && index < m_lstRideData.Count) { grid.SetGridData(m_lstRideData[index]); } } if (data is UISkillGrid) { UISkillGrid grid = data as UISkillGrid; if (index < m_lst_RideSkill.Count) { UISkillGridData para = new UISkillGridData() { skillid = m_lst_RideSkill[index], skillType = 2 }; grid.SetGridData(para); } } }