FrameSyncUpdateSimulator createFrameSyncUpdateSimulator(FrameSync frameSync) { if (_frameSyncUpdateSimulator == null) { _frameSyncUpdateSimulator = new FrameSyncUpdateSimulator(); } _frameSyncUpdateSimulator.init(frameSync); return(_frameSyncUpdateSimulator); }
void onFBGameEnter() { FrameSyncUpdateSimulator simulator = createFrameSyncUpdateSimulator(Game.instance.fbGame.frameSync); Game.instance.fbGame.frameSyncUpdater = simulator; simulator.start(); RealTimeRAProcessCenter.instance.start(); }
void onFBGameOver() { Profiler.instance.stopPing(); //??保存录像 //RealTimeRAProcessCenter.instance.saveReplay(); //创建帧同步更新模拟器 FrameSyncUpdateSimulator simulator = createFrameSyncUpdateSimulator(Game.instance.fbGame.frameSync); Game.instance.fbGame.frameSyncUpdater = simulator; simulator.start(); }