using UnityEngine; using System.Collections.Generic; using System; using System.Xml.Serialization; using AX.TrackRecord; using System.Collections; public class EndBackView : MonoBehaviour { int Index; public static bool lock_ = false; GameObject ThePfire; ArrayList List; bool kong = false; TimeSpan GameTime; public float Value; TimeSpan TheSum_Time; public GameObject stopwatch; //public RecordManager Record; TimeSpan TheDeltaTime; float X; int I_D; float datetime = 0; TimeSpan TheSumTime; public GameObject TimeGame; void Start() { ThePfire = GameObject.Find("pdrawline").gameObject; } /* void Update() { if (!kong) { return; } if (Index < Record.record_Load.EventList.Count - 1 || (Index != Record.record_Load.EventList.Count - 1 && !lock_)) //点击节点后开始重新生成事件 { Record.GetEventIndex(Index, true, false); Index++; lock_ = true; } else if (Index == Record.record_Load.EventList.Count - 1)//生成的最后时间 { for (int i = 0; i < Record.record_Load.EventList.Count; i++) { if (Record.record_Load.EventList[i].eventType == eventTypeRecord.StartPractice) { int Id = i; if (Index >= Id) { stopwatch.gameObject.SetActive(true); TimeSpan GameTime_ = (Record.record_Load.EventList[Index].Time_).Subtract(Record.record_Load.EventList[Id].Time_).Duration(); Stopwatch.hours = GameTime_.Hours; Stopwatch.minutes = GameTime_.Minutes; Stopwatch.seconds = GameTime_.Seconds; } else { stopwatch.gameObject.SetActive(false); } } } Record.GetEventIndex(Index, true, true); lock_ = true; Record.has = false; kong = false; Record.ComputationTime(Index); RecordManager.Instance.TheDeltaTimeSinceStartPlayBack = (float)GameTime.TotalSeconds; //改变RecordManager脚本的时间 Index++; } } public int ID; public int Num; public GameObject TheToolGame; public void EndRecordBackView() { TimeGame.gameObject.SetActive(false); TheToolGame.SetActive(true); UseBack(); } public void UseBack() //点击节点重新生成事件,重新对进度条赋值 { foreach (Transform child in ThePfire.transform) { if (child != null) { Destroy(child.gameObject); } } Index = 0; Record.has = true; List = new ArrayList(); Record.DestroyGame(); //删除所有事件 kong = true; //控制Update GameTime = (Record.record_Load.EventList[Record.record_Load.EventList.Count - 1].Time_).Subtract(Record.record_Load.StartTime).Duration(); //当前时间 TheSumTime = (Record.record_Load.EventList[Record.record_Load.EventList.Count - 1].Time_).Subtract(Record.record_Load.StartTime).Duration(); ClickJieDianApect(GameTime); Record.LoadObjSetToOriginalTran(); } public void ClickJieDianApect(TimeSpan time) { string t = time.TotalSeconds.ToString(); datetime = float.Parse(t); //接受点击事件的时间,然后在从这个时间点累加datetime,改变SilderValue }*/ }