Beispiel #1
0
    private void Start()
    {
        m_CameraRotator = GetComponentInChildren <CameraRotator> ();
        m_CameraFlyer   = GetComponentInChildren <CameraFlyer> ();

        if (m_CameraRotator == null)
        {
            Debug.LogError("No CameraRotator in a child of CameraSwitcher.");
        }
        if (m_CameraFlyer == null)
        {
            Debug.LogError("No CameraFlyer in a child of CameraSwitcher.");
        }

        if (startWithCameraRotator)
        {
            m_CameraRotator.enabled = true;
            m_CameraFlyer.enabled   = false;
            m_CameraFlyer.Disable();
        }
        else
        {
            m_CameraRotator.enabled = false;
            m_CameraRotator.Disable();
            m_CameraFlyer.enabled = true;
        }
    }
Beispiel #2
0
    private void Start()
    {
        m_CameraRotator = GetComponentInChildren <CameraRotator> ();
        m_CameraFlyer = GetComponentInChildren <CameraFlyer> ();

        if (m_CameraRotator == null) {
            Debug.LogError ("No CameraRotator in a child of CameraSwitcher.");
        }
        if (m_CameraFlyer == null) {
            Debug.LogError ("No CameraFlyer in a child of CameraSwitcher.");
        }

        if (startWithCameraRotator) {
            m_CameraRotator.enabled = true;
            m_CameraFlyer.enabled = false;
            m_CameraFlyer.Disable ();
        } else {
            m_CameraRotator.enabled = false;
            m_CameraRotator.Disable ();
            m_CameraFlyer.enabled = true;
        }
    }