Esempio n. 1
0
    void Start()
    {
        //Check if Vive detected and enable/disable the appropriate things
        if (ViveDetected)
        {
            OculusFPC.enabled     = false;
            OculusCC.enabled      = false;
            OculusAS.enabled      = false;
            OculusRaycast.enabled = false;
            OculusCrosshair.SetActive(false);
            SteamVRObject.transform.position = new Vector3(0f, 0f, 0f);
        }
        else if (OculusDetected)
        {
            OculusFPC.enabled     = true;
            OculusCC.enabled      = true;
            OculusAS.enabled      = true;
            OculusRaycast.enabled = true;
            OculusCrosshair.SetActive(true);
            SteamVRObject.transform.position = new Vector3(0f, 0.6f, 0f);

            CharacterController cc = SteamVRObject.GetComponent <CharacterController>();
            cc.height = 1.0f;
        }
        else
        {
            Debug.Log("No Oculus Detected. Going to player mode");

            OculusFPC.enabled     = true;
            OculusCC.enabled      = true;
            OculusAS.enabled      = true;
            OculusRaycast.enabled = true;
            OculusCrosshair.SetActive(true);
            SteamVRObject.transform.position = new Vector3(0f, 0.6f, 0f);

            CharacterController cc = SteamVRObject.GetComponent <CharacterController>();
            cc.height = 3.0f;
        }


        foreach (Text VersionNum in VersionUI)
        {
            VersionNum.text = "VR Model Viewer: " + VersionNumber;
        }

        //Check that the right objects are enabled/disabled on start
        MainMenuUI.SetActive(true);

        LowPolyStage.SetActive(true);
        Bedroom.SetActive(false);
        DarkRoom.SetActive(false);
        JapRoom.SetActive(false);
        ParkingLot.SetActive(false);
        BookersOffice.SetActive(false);

        //All characters disabled on start
        ClaraLille.SetActive(false);
        Quiet.SetActive(false);
        Ciri.SetActive(false);
        Yennefer.SetActive(false);
        Tracer.SetActive(false);
        MadMoxxi.SetActive(false);
        DVa.SetActive(false);
        Widowmaker.SetActive(false);

        Nidalee.SetActive(false);
        Elizabeth.SetActive(false);
        Triss.SetActive(false);
        HarleyQuinn.SetActive(false);
        JillValentine.SetActive(false);
        LaraToO.SetActive(false);
        Jack.SetActive(false);
        JulietStarling.SetActive(false);

        foreach (GameObject obj in DisableUIScreens)
        {
            obj.SetActive(false);
        }

        //Set all UI values to 0
        ClaraRotationSlider.value     = 0f;
        QuietRotationSlider.value     = 0f;
        CiriRotationSlider.value      = 0f;
        YenneferRotationSlider.value  = 0f;
        TracerRotationSlider.value    = 0f;
        MoxxiRotationSlider.value     = 0f;
        DVaRotSlider.value            = 0f;
        NidaleeRotSlider.value        = 0f;
        ElizabethRotSlider.value      = 0f;
        TrissRotSlider.value          = 0f;
        HarleyQuinnRotSlider.value    = 0f;
        JillValentineRotSlider.value  = 0f;
        LaraToORotSlider.value        = 0f;
        JackRotSlider.value           = 0f;
        JulietStarlingRotSlider.value = 0f;
        WidowmakerRotSlider.value     = 0f;

        //Change scale values once you know the right ones
        ClaraScaleSlider.value          = 0.23f;
        QuietScaleSlider.value          = 0.23f;
        CiriScaleSlider.value           = 0.23f;
        YenneferScaleSlider.value       = 0.23f;
        TracerScaleSlider.value         = 0.23f;
        MoxxiScaleSlider.value          = 0.23f;
        DVaScaleSlider.value            = 0.23f;
        NidaleeScaleSlider.value        = 0.23f;
        ElizabethScaleSlider.value      = 0.23f;
        TrissScaleSlider.value          = 0.23f;
        HarleyQuinnScaleSlider.value    = 0.23f;
        JillValentineScaleSlider.value  = 0.23f;
        LaraToOScaleSlider.value        = 0.23f;
        JackScaleSlider.value           = 0.23f;
        JulietStarlingScaleSlider.value = 0.23f;
        WidowmakerScaleSlider.value     = 0.23f;
    }
Esempio n. 2
0
 private void MakeSnapshot()
 {
     DarkRoom.MakeSnapshot(this);
 }