Exemplo n.º 1
0
        public void Update()
        {
            if (!startDateTime.HasValue)
            {
                startDateTime = DateTime.Now;
                Physics.Awake();
            }

            var elapsedSeconds = (DateTime.Now - startDateTime.Value).TotalSeconds;
            var currentStep    = elapsedSeconds / Settings.SimulationStep;

            CurrentStep         = (int)currentStep;
            CurrentStepProgress = (float)(elapsedSeconds % Settings.SimulationStep) / Settings.SimulationStepF;
        }