public void MouseLookEnabledChanged(bool val)
 {
     MouseLookEnabledCheckBox.isOn = val;
     foreach (GameObject obj in GameObject.FindGameObjectsWithTag("Player"))
     {
         UnityEngine.Networking.NetworkBehaviour network = obj.GetComponent <UnityEngine.Networking.NetworkBehaviour>();
         if (network == null || network.isLocalPlayer)
         {
             WeatherMakerPlayerControllerScript controller = obj.GetComponent <WeatherMakerPlayerControllerScript>();
             if (controller != null)
             {
                 controller.EnableMouseLook = val;
             }
         }
     }
 }
Example #2
0
 /// <summary>
 /// Mouse look value change
 /// </summary>
 /// <param name="val">New value</param>
 public void MouseLookEnabledChanged(bool val)
 {
     MouseLookEnabledCheckBox.isOn = val;
     foreach (GameObject obj in GameObject.FindGameObjectsWithTag("Player"))
     {
         if (WeatherMakerScript.IsLocalPlayer(obj.transform))
         {
             WeatherMakerPlayerControllerScript controller = obj.GetComponent <WeatherMakerPlayerControllerScript>();
             if (controller != null && controller.enabled)
             {
                 controller.EnableMouseLook = val;
                 break;
             }
         }
     }
 }