public ControllerOffsetPauseViewController([InjectOptional] GameplayCoreSceneSetupData gameplayCoreSceneSetupData, PauseMenuManager pauseMenuManager, SaberManager saberManager, ControllerOffsetPresetsModalController controllerOffsetPresetsModalController, ControllerOffsetSettingsModalController controllerOffsetSettingsModalController) : base(controllerOffsetPresetsModalController, controllerOffsetSettingsModalController)
        {
            if (gameplayCoreSceneSetupData == null || gameplayCoreSceneSetupData?.practiceSettings == null)
            {
                practiceMode = false;
                return;
            }
            practiceMode          = true;
            this.pauseMenuManager = pauseMenuManager;
            VRController leftController = saberManager?.leftSaber.GetComponentInParent <VRController>();
            VRControllersValueSOOffsets vrControllerTransformOffset = (VRControllersValueSOOffsets)Accessors.VRControllerTransformOffsetAccessor(ref leftController);

            positionOffset = Accessors.PositionOffsetAccessor(ref vrControllerTransformOffset);
            rotationOffset = Accessors.RotationOffsetAccessor(ref vrControllerTransformOffset);
        }
예제 #2
0
 public ControllerOffsetViewController(ControllerOffsetPresetsModalController controllerOffsetPresetsModalController, ControllerOffsetSettingsModalController controllerOffsetSettingsModalController)
 {
     this.controllerOffsetPresetsModalController  = controllerOffsetPresetsModalController;
     this.controllerOffsetSettingsModalController = controllerOffsetSettingsModalController;
 }
 public ControllerOffsetModifierViewController(GameplaySetupViewController gameplaySetupViewController, MainSettingsMenuViewController mainSettingsMenuViewController, ControllerOffsetPresetsModalController controllerOffsetPresetsModalController, ControllerOffsetSettingsModalController controllerOffsetSettingsModalController) : base(controllerOffsetPresetsModalController, controllerOffsetSettingsModalController)
 {
     this.gameplaySetupViewController = gameplaySetupViewController;
     SettingsSubMenuInfo[] settingsSubMenuInfos = Accessors.SettingsSubMenuInfoAccessor(ref mainSettingsMenuViewController);
     foreach (var settingSubMenuInfo in settingsSubMenuInfos)
     {
         if (settingSubMenuInfo.viewController is ControllersTransformSettingsViewController controllersTransformSettingsViewController)
         {
             positionOffset = Accessors.ControllerPositionAccessor(ref controllersTransformSettingsViewController);
             rotationOffset = Accessors.ControllerRotationAccessor(ref controllersTransformSettingsViewController);
             break;
         }
     }
 }