Beispiel #1
0
 // Update is called once per frame
 void Update()
 {
     if (gameManager.inputDisabled || GetInputControl)
     {
         if (Input.GetKey(KeyCode.Alpha1) || Input.GetKey(KeyCode.Alpha2) || Input.GetKey(KeyCode.Alpha3))
         {
             GetInputControl = true;
             if (!cameraArriveAtWideAngle)
             {
                 mainCamera.SlerpToPosition(mainCamera.wideAnglePosition);
                 if (Vector3.Distance(mainCamera.transform.position, mainCamera.wideAnglePosition) < mainCamera.wideAnglePositionAccuracy)
                 {
                     cameraArriveAtWideAngle = true;
                 }
             }
             else
             {
                 if (Input.GetKey(KeyCode.Alpha1))
                 {
                 }
             }
         }
     }
 }