Пример #1
0
        private static void CmdStopCapture()
        {
            PlaybackRecorder recorder = Engine.Scene.Tracker.GetEntity <PlaybackRecorder>();

            if (recorder != null)
            {
                recorder.StopRecording();
                Engine.Commands.Log($"Saved playback as {recorder.Filename}.bin");
            }
        }
Пример #2
0
        private static void CmdStartCapture(string filename = "latestCustomRecording")
        {
            Player player = Engine.Scene.Tracker.GetEntity <Player>();

            if (player != null)
            {
                PlaybackRecorder recorder = Engine.Scene.Tracker.GetEntity <PlaybackRecorder>();
                if (recorder == null)
                {
                    recorder = new PlaybackRecorder(player, filename);
                    Engine.Scene.Add(recorder);
                }
                else
                {
                    recorder.Filename = filename;
                }
                recorder.StartRecording();
            }
            Engine.Commands.Log("Started recording playback.");
        }