Пример #1
0
 private void Start()
 {
     animator          = path.GetComponent <CameraPathAnimator>();
     fpsCamera         = playerFPSController.GetComponentInChildren <Camera>();
     fpsCamera.enabled = false;
     playerModel.SetActive(true);
     Invoke("SetValuesOnFPSControllerSettled", 1.0f);
     path.orientationList[path.realNumberOfPoints - 1].rotation = fpsCamera.transform.rotation;
     playerFPSController.GetComponent <CPEMouseLook>().enabled  = false;
 }
Пример #2
0
    private void OnEnable()
    {
        if(target != null)
        {
            _cameraPath = (CameraPath)target;
            _animator = _cameraPath.GetComponent<CameraPathAnimator>();
        }

        CameraPathEditorSceneGUI._cameraPath = _cameraPath;
        CameraPathEditorSceneGUI._animator = _animator;

        CameraPathEditorInspectorGUI._cameraPath = _cameraPath;
        CameraPathEditorInspectorGUI._animator = _animator;
        CameraPathEditorInspectorGUI.Setup();
    }
Пример #3
0
    private void OnEnable()
    {
        if (target != null)
        {
            _cameraPath = (CameraPath)target;
            _animator   = _cameraPath.GetComponent <CameraPathAnimator>();
        }

        CameraPathEditorSceneGUI._cameraPath = _cameraPath;
        CameraPathEditorSceneGUI._animator   = _animator;

        CameraPathEditorInspectorGUI._cameraPath = _cameraPath;
        CameraPathEditorInspectorGUI._animator   = _animator;
        CameraPathEditorInspectorGUI.Setup();
    }
Пример #4
0
    private void OnEnable()
    {
        if (target != null)
        {
            _cameraPath = (CameraPath)target;
            _animator   = _cameraPath.GetComponent <CameraPathAnimator>();
        }

        CameraPathEditorSceneGUI._cameraPath  = _cameraPath;
        CameraPathEditorSceneGUI._animator    = _animator;
        CameraPathEditorSceneGUI.colouredText = new GUIStyle();
        CameraPathEditorSceneGUI.colouredText.normal.textColor = _cameraPath.textColour;

        CameraPathEditorInspectorGUI._cameraPath = _cameraPath;
        CameraPathEditorInspectorGUI._animator   = _animator;
        CameraPathEditorInspectorGUI.Setup();
    }
    public void startCamera()
    {
        cameras [index].gameObject.SetActive(true);
        // enable touch in vr
        //Cardboard.SDK.TapIsTrigger = false;
        CameraPathAnimator cpa = camerapath.GetComponent <CameraPathAnimator> ();

        cpa.animationObject = cameras [index];
        cpa.Seek(startPositions[index]);
        cpa.Play();

        // switch on vr, switch off canvas
        //Cardboard.SDK.TapIsTrigger = true;
        gameObject.SetActive(false);

        //initialize rest
        initializeGameObject();
    }