public void Show(int _npcID, int _eventID)
	{
		AsSoundManager.Instance.PlaySound(AsSoundPath.WindowOpen, Vector3.zero, false, false);

		npcID = _npcID;
		eventID = _eventID;

		nowEventRecord = AsTableManager.Instance.GetTbl_Event(_eventID);

		txtTitle.Text = AsTableManager.Instance.GetTbl_String(nowEventRecord.titleID);

		foreach (EventAchievement achieve in nowEventRecord.listEventAchievement)
			AddRewardItem(achieve);

		UpdateRewardBtn();

		// info
		UIListItemContainer item = rewardInfoScroll.CreateItem(rewardInfoListItemPrefab, 0, true) as UIListItemContainer;
		
		//txtInfo = item.gameObject.GetComponentInChildren<SpriteText>();
		//txtInfo.Text = AsTableManager.Instance.GetTbl_String(nowEventRecord.txtID);

		item.Text = RepairString(AsTableManager.Instance.GetTbl_String(nowEventRecord.txtID), item.spriteText);

		//item.Text = AsTableManager.Instance.GetTbl_String(nowEventRecord.txtID);
		

		item.UpdateCollider();
		item.UpdateCamera();
	}
Ejemplo n.º 2
0
	void AddListItem(Tbl_Event_Record _event)
	{
		UIListItem listItem = eventScrollList.CreateItem(listItemPrefab, eventScrollList.Count, true) as UIListItem;
		listItem.AddInputDelegate(EventListInputProcess);

		listItem.spriteText.Text = AsTableManager.Instance.GetTbl_String(_event.titleID);
		listItem.Data			 = _event.eventIdx;
		listItem.SetOffset(new Vector3(0.0f, 0.0f, -0.2f));	
	}
Ejemplo n.º 3
0
	public override void LoadTable(string _path)
	{
		try
		{
			XmlElement root		= GetXmlRootElement(_path);
			XmlNodeList nodes	= root.SelectNodes("Event");
			m_ResourceTableNpc = new Dictionary<int, List<Tbl_Event_Record>>();

			foreach (XmlNode node in nodes)
			{
				Tbl_Event_Record record = new Tbl_Event_Record((XmlElement)node);

				if (m_ResourceTableNpc.ContainsKey(record.npcID))
					m_ResourceTableNpc[record.npcID].Add(record);
				else
				{
					m_ResourceTableNpc.Add(record.npcID, new List<Tbl_Event_Record>());
					m_ResourceTableNpc[record.npcID].Add(record);
				}
				
				if (!m_ResourceTableAll.ContainsKey(record.eventIdx))
					m_ResourceTableAll.Add(record.eventIdx, record);

			}
		}
		catch (System.Exception e)
		{
			Debug.LogError("[Tbl_Event_Table] LoadTable:|" + e + "| error while parsing");
		}
	}