Example #1
0
        public AudioApplication(GlobalWorld source, Context overrideContext) : base(source, overrideContext)
        {
            targetFrequency = TimeSpan.FromSeconds(1f / 500f);
            timeApp         = new TimeApp(Data.Context);
            fts             = new FixedTimeStep {
                TargetFrameTimeMs = (int)targetFrequency.TotalMilliseconds
            };

            worker = new ApplicationWorker("Audio");
        }
        public SimulationApplication(GlobalWorld source, Context overrideContext) : base(source, overrideContext)
        {
            // register game world since it's kinda important for the simu app, ahah
            Data.Context.BindExisting(gameWorld = new GameWorld());
            Data.Context.BindExisting <IBatchRunner>(batchRunner = new ThreadBatchRunner(0.5f)); // we only use 50% of the cores

            targetFrequency = TimeSpan.FromSeconds(0.02);                                        // 100 fps
            timeApp         = new TimeApp(Data.Context);
            fts             = new FixedTimeStep {
                TargetFrameTimeMs = (int)targetFrequency.TotalMilliseconds
            };

            worker = new ApplicationWorker("Simulation");
        }