Exemplo n.º 1
0
        void ICoreTick.OnUpdate(float delta)
        {
            // Validate delta data
            if (!CoreTickValidationUtility.ValidateDeltaInterval(delta))
                return;

            // Update total elapsed time
            elapsedSinceSimStartup += TimeSpan.FromSeconds(delta);

            // Tick simulations
            TickExecutorUtility.ExecuteSimulationTicks(delta, simulationTicks);
            TickExecutorUtility.ExecuteRenderTicks(delta, renderTick);
        }
Exemplo n.º 2
0
        public CoreTick(CoreTickSystemConfigData data)
            : base(data)
        {
            // Make sure we have valid ticking data
            if (!CoreTickValidationUtility.ValidateCoreTickSystemConfigData(data))
                return;

            // Create default render tick
            renderTick = new TickRender(data.renderTicksets);

            // Create simulation ticks and add to lists
            List<TickSimulation> fixedList = new List<TickSimulation>();
            foreach (TickSimulationConfigData sim in _systemData.simulationTicks)
            {
                fixedList.Add(new TickSimulation(sim));
            }
            simulationTicks = fixedList.ToArray();
        }