Implement force tick and sync time for input proxy.
This commit is contained in:
@@ -115,16 +115,9 @@ namespace Cryville.Crtr {
|
||||
? 1f / Application.targetFrameRate
|
||||
: Time.deltaTime;
|
||||
firstFrame = false;
|
||||
inputProxy.ForceTick();
|
||||
cbus.ForwardByTime(dt);
|
||||
bbus.ForwardByTime(dt);
|
||||
UnityEngine.Profiling.Profiler.BeginSample("ChartPlayer.FeedJudge");
|
||||
/*judge.StartFrame();
|
||||
Game.InputManager.EnumerateEvents(ev => {
|
||||
// Logger.Log("main", 0, "Input", ev.ToString());
|
||||
judge.Feed(ev);
|
||||
});
|
||||
judge.EndFrame();*/
|
||||
UnityEngine.Profiling.Profiler.EndSample();
|
||||
UnityEngine.Profiling.Profiler.BeginSample("ChartPlayer.Forward");
|
||||
UnityEngine.Profiling.Profiler.BeginSample("EventBus.Copy");
|
||||
bbus.CopyTo(2, tbus);
|
||||
@@ -410,6 +403,7 @@ namespace Cryville.Crtr {
|
||||
Game.AudioSequencer.Playing = true;
|
||||
Thread.Sleep((int)(Game.AudioClient.BufferPosition - Game.AudioClient.Position));
|
||||
// TODO SyncTime(cbus.Time);
|
||||
inputProxy.SyncTime(cbus.Time);
|
||||
started = true;
|
||||
}
|
||||
catch (Exception ex) {
|
||||
|
Reference in New Issue
Block a user