Exemple #1
0
 void Update()
 {
     if (Input.GetKey(KeyCode.Escape))
     {
         Application.Quit();
         return;
     }
     if (isInputDisabled && ((Time.realtimeSinceStartup - lastInputTime) < pollIntervel))
     {
         return;
     }
     isInputDisabled = false;
     if (Input.GetKey(KeyCode.F1))
     {
         //LINEAR
         if (crspc != null)
         {
             crspc.StopCamera();
         }
         if (lpc != null)
         {
             lpc.ToggleAutoCam();
         }
         isInputDisabled = true;
         lastInputTime   = Time.realtimeSinceStartup;
     }
     else if (Input.GetKey(KeyCode.F2))
     {
         //CATMULLROMSPLINE
         if (lpc != null)
         {
             lpc.StopCamera();
         }
         if (crspc != null)
         {
             crspc.ToggleAutoCam();
         }
         isInputDisabled = true;
         lastInputTime   = Time.realtimeSinceStartup;
     }
     else if (Input.GetKey(KeyCode.F3))
     {
         if (fps != null)
         {
             fps.ToggleDisplay();
         }
         isInputDisabled = true;
         lastInputTime   = Time.realtimeSinceStartup;
     }
     else if (Input.GetKey(KeyCode.H))
     {
         showHelp        = !showHelp;
         isInputDisabled = true;
         lastInputTime   = Time.realtimeSinceStartup;
     }
 }