Esempio n. 1
0
 public void OnRight(InputAction.CallbackContext context)
 {
     if (UDLRCameraController.Instance != null)
     {
         CubeController cubeController = GetCubeForCameraPanelPosition(UDLRCameraController.Instance.selectedPosition);
         if (cubeController != null)
         {
             //move cube according to selected camera
             CamAnimator selectedCam = UDLRCameraController.GetSelectedCameraAnimator();
             Vector3     movementVec = selectedCam != null ? selectedCam.transform.right : Vector3.zero;
             movementVec.Normalize();
             cubeController?.MoveInDirection(movementVec);
             lastMovementDirection = UIPanel.MovementDirection.Right;
         }
     }
 }