Example #1
0
 public void SendEnvironmentState(Commands.EnvironmentState state)
 {
     Clients.ForEach(c =>
     {
         Packets.Send(c.Peer, state, DeliveryMethod.ReliableSequenced);
     });
 }
Example #2
0
        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;
        }