Esempio n. 1
0
        /// <summary>
        /// Method invoked when manager receives command updating environment state
        /// </summary>
        /// <param name="state">Environment state update command</param>
        private void OnEnvironmentStateCommand(Commands.EnvironmentState state)
        {
            // TODO: this seems backwards to update UI to update actual values

            var ui = SimulatorManager.Instance.UIManager;

            ui.FogSlider.value       = state.Fog;
            ui.RainSlider.value      = state.Rain;
            ui.WetSlider.value       = state.Wet;
            ui.CloudSlider.value     = state.Cloud;
            ui.TimeOfDaySlider.value = state.TimeOfDay;
        }
Esempio n. 2
0
        /// <summary>
        /// Method invoked when manager receives command updating environment state
        /// </summary>
        /// <param name="state">Environment state update command</param>
        private void OnEnvironmentStateCommand(Commands.EnvironmentState state)
        {
            // TODO: this seems backwards to update UI to update actual values

            var ui = SimulatorManager.Instance.UIManager;

            ui.FogSlider.value       = state.Fog;
            ui.RainSlider.value      = state.Rain;
            ui.WetSlider.value       = state.Wet;
            ui.CloudSlider.value     = state.Cloud;
            ui.DamageSlider.value    = state.Damage;
            ui.TimeOfDaySlider.value = state.TimeOfDay;
            Log.Info($"{GetType().Name} received environment state update.");
        }