示例#1
0
    // Update is called once per frame
    void Update()
    {
        if (keyb.IsKeyToggled(reloadScene))
        {
            Application.LoadLevel(Application.loadedLevel);
        }

        if (keyb.IsKeyToggled(quitScene))
        {
            Application.Quit();
        }

        if (keyb.IsKeyToggled(modeAssiste))
        {
            gameManager.CurrentMode = Modelisation.Mode.Assisted;
        }


        if (keyb.IsKeyToggled(modeAutonome))
        {
            gameManager.CurrentMode = Modelisation.Mode.Auto;
        }

        if (keyb.IsKeyToggled(scenarioAppelSimple))
        {
            Debug.Log("Scenario appel d'un ami");
            gameManager.loadScenario("appel");
        }

        if (keyb.IsKeyToggled(scenarioAppelInfirmier))
        {
            Debug.Log("Scenario appel d'un infirmier");
            gameManager.loadScenario("infirmier");
        }

        if (keyb.IsKeyToggled(scenarioVisiteInconnu))
        {
            Debug.Log("Scenario appel d'un inconnu");
            gameManager.loadScenario("inconnu");
        }

        if (keyb.IsKeyToggled(noScenario))
        {
            gameManager.loadScenario("aucun");
        }

        if ((keyb.IsKeyToggled(sensibilityUp) && keyb.IsKeyPressed(sensibilityDown)) ||
            (keyb.IsKeyToggled(sensibilityDown) && keyb.IsKeyPressed(sensibilityUp)))
        {
            vrfps.Sensibility = 3.0f;
        }
        else if (keyb.IsKeyToggled(lookSensibilityDown) && keyb.IsKeyPressed(lookSensibilityUp))
        {
            vrfps.lookSensibility = 1.0f;
        }

        else if (keyb.IsKeyToggled(sensibilityUp))
        {
            vrfps.Sensibility *= sensibilityFactor;
        }

        else if (keyb.IsKeyToggled(sensibilityDown))
        {
            vrfps.Sensibility /= sensibilityFactor;
        }

        else if (keyb.IsKeyToggled(lookSensibilityUp))
        {
            vrfps.lookSensibility *= lookSensibilityFactor;
        }

        else if (keyb.IsKeyToggled(lookSensibilityDown))
        {
            vrfps.lookSensibility /= lookSensibilityFactor;
        }
    }
示例#2
0
文件: VRMenu.cs 项目: nhurman/avalon
 private vrValue ScenarioAppelHandler(vrValue iValue)
 {
     menuManager.DisplayOrHideMenu();
     gameManager.loadScenario("appel");
     return(null);
 }