天津23维预案
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

67 lines
2.2 KiB

using UnityEngine;
using System.Collections.Generic;
using System;
using System.Xml.Serialization;
using AX.TrackRecord;
using System.Collections;
using AX.MessageSystem;
using UnityEngine.UI;
using System.IO;
public class HeBingRecord : MonoBehaviour {
private static HeBingRecord instance;
public static HeBingRecord GetInstance()
{
if (instance == null)
{
instance = new HeBingRecord();
}
return instance;
}
public Record_One_root GetRecordList(List<Record_One_root> TheList)//把需要合并的记录的数组传过来
{
for (int i = 0; i < TheList.Count; i++)
{
Record_One_root Record = TheList[i] as Record_One_root;
for (int j = 0; j < Record.EventList.Count; j++)
{
EventRecordItem_two Event= Record.EventList[j] as EventRecordItem_two;
if (Event.eventType == eventTypeRecord.AddGpcAUTOTag || Event.eventType == eventTypeRecord.ZongJiePingPanTag)
{
Event.CreatName = Record.ScoreName;
}
}
}
Record_One_root record = TheList[0];
List<EventRecordItem_two> eventList = new List<EventRecordItem_two>();
for (int i = 1; i < TheList.Count; i++)
{
List<EventRecordItem_two> item =TheList[i].EventList as List<EventRecordItem_two>;
for (int j = 0; j < item.Count; j++)
{
EventRecordItem_two Event = item[j] as EventRecordItem_two;
if (Event.eventType == eventTypeRecord.AddLoadTag || Event.eventType == eventTypeRecord.ZongJiePingPanTag
|| Event.eventType == eventTypeRecord.AddGpcAUTOTag)
{
Insert(record.EventList, Event);
}
}
}
return record;
}
public void Insert(List<EventRecordItem_two> EventList,EventRecordItem_two eventItem)//将新的数据插入该条记录中
{
EventList.Add(eventItem);
LoadManager.Instance.eventListDic.AddEventToDict(eventItem);
LoadManager.Instance.eventListDic.DictSort();
}
}