Beispiel #1
0
 private void InitializePCEnvironment(NonMobilePlayerControls pcControls, PlayerMove androidPlayerMove, PlayerLook androidPlayerLook)
 {
     // Deactivate all the joysticks.
     foreach (GameObject joystick in joysticks)
     {
         joystick.SetActive(false);
     }
     // Activate all the PC info bars.
     foreach (GameObject info in pcButtonInfos)
     {
         info.SetActive(true);
     }
     // Disable the scripts associated with android.
     androidPlayerMove.enabled = false;
     androidPlayerLook.enabled = false;
     // And enable the scripts associated with PC.
     pcControls.enabled = true;
     // Activate the crosshair.
     crosshair.SetActive(true);
     // Lock the cursor and make it invisible.
     Cursor.lockState = CursorLockMode.Confined;
     Cursor.visible   = false;
 }
Beispiel #2
0
 private static void FindScriptComponents(out NonMobilePlayerControls pcControls, out PlayerMove androidPlayerMove, out PlayerLook androidPlayerLook)
 {
     pcControls        = FindObjectOfType <NonMobilePlayerControls>();
     androidPlayerMove = FindObjectOfType <PlayerMove>();
     androidPlayerLook = FindObjectOfType <PlayerLook>();
 }