void Update() { cooldownTick -= Time.deltaTime; if (recordNow && cooldownTick <= 0) { SingleSample sample = new SingleSample() { }; sample.trackersWorldPositions = new List <Vector3>(); for (int i = 0; i < trackersTransform.Count; i++) { sample.trackersWorldPositions.Add(trackersTransform[i].position); } sample.tickIndex = currentTick; memoryMovments.Add(sample); currentTick++; cooldownTick = tickCadence; DoPreviewTrackers(); } if (playbackNow && cooldownTick <= 0) { if (currentTick >= memoryMovments.Count) { currentTick = 0; } currentTick++; DoPreviewTrackers(); cooldownTick = tickCadence; } }
static void Main(string[] args) { // 必须指定Provider DbProviderUtil.Provider = new DapperDataProviderManager().LoadDataProvider(); SingleSample.RunTask(); //Ganji.RunTask(); //News163.Run(); //OschinaAnswer.Run(); //// QQ 美食已经不提供服务了 ////QqMeishi.Run(); //OschinaBlog.Run(); //IteyeBlog.Run(); //Init(); //String key = null; //key = ReadKey(key); //Console.WriteLine("The demo started and will last 20 seconds..."); ////Start spider //Site site = new Site { Encoding = Encoding.UTF8 }; //site.AddStartUrl(_urlMap[key]); //OoSpider.Create(site, _typesMap[key]).AddPipeline(new MultiPagePipeline()).AddPipeline(new ConsolePipeline()).RunAsync(); //try //{ // Thread.Sleep(200000); //} //catch (Exception e) //{ // Console.WriteLine(e.ToString()); //} //Console.WriteLine("The demo stopped!"); //Console.WriteLine("To more usage, try to customize your own Spider!"); }