/// <summary> /// 实例化Text Item /// </summary> /// <param name="_Data">表数据</param> /// <param name="_ActivityOverviewData">服务器数据</param> private void GreatTextItem(GameactivityTemplate _Data, ActivityOverviewData _ActivityOverviewData) { for (int k = 0; k < m_TextItemParent.transform.childCount; k++) { if (m_TextItemParent.transform.GetChild(k).gameObject.name == "item(Clone)") { Destroy(m_TextItemParent.transform.GetChild(k).gameObject); } } GameObject _TextItem = Instantiate(m_TextItem) as GameObject; _TextItem.transform.SetParent(m_TextItemParent.transform, true); _TextItem.transform.localScale = new Vector3(1, 1, 1); _TextItem.transform.localPosition = new Vector3(0, 0, 0); _TextItem.gameObject.SetActive(true); _TextItem.GetComponent <TextItem>().SetTextData(GameUtils.getString(_Data.getContentdes())); //右界面显示的内容(标题;时间;按钮字) //显示已经完成的条件(花了多少金币;完成多少任务--- 按钮上面的字) m_TitleText.text = GameUtils.getString(_Data.getTitledes()); string dt1 = GameUtils.ConvertStringToDate(_Data.getBeginday()); string dt2 = GameUtils.ConvertStringToDate(_Data.getDeadline()); m_TimeText.text = dt1 + "-" + dt2; TotalNumStyleText(_Data.getType(), _Data.getParameter2(), _ActivityOverviewData.m_allactivitynum, _ActivityOverviewData.m_activitynum); }
public void SetActivityDate(ActivityOverviewData _data, int _itemId) { m_ActivityOverviewData = _data; m_itemID = _itemId; GameactivityTemplate _itemData = (GameactivityTemplate)DataTemplate.GetInstance().m_GameactivityTable.getTableData(_data.m_id); m_TitleText.text = GameUtils.getString(_itemData.getTitledes()); //Debug.Log("_data.m_id : " + _data.m_id + "----" + m_ActivityOverviewData.m_issee); m_RedPointImage.gameObject.SetActive(m_ActivityOverviewData.m_issee == 0 ? true : false); }