Exemplo n.º 1
0
 /// <summary>
 /// Enqueue a Simulation Result. Thread-safe.
 /// </summary>
 /// <param name="step">Simulation Result.</param>
 private void EnqueueStep(SimulationStep step)
 {
     lock (stepsQueueLock)
     {
         stepsQueue.Enqueue(step);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Simulates one step.
        /// </summary>
        private void SimulateStep()
        {
            Debug.Log("Step");

            CUE cue = CUE.GetInstance();

            SimulationStep step = simulator.Step(cue.SimulationStep);

            EnqueueStep(step);
            nextStep = nextStep.AddSeconds(cue.VisualizationStep);
        }