예제 #1
0
 void SwitchType(FollowViewType type)
 {
     if (type == FollowViewType.First)
     {
         m_Clip.CanClip = false;
         OnFirstSwitchCompeleted();
     }
     else
     {
         OnThirdSwithcCompeleted();
     }
 }
예제 #2
0
        Vector3 GetPosition(FollowViewType type)
        {
            float distance = cameraDistence;
            float height   = cameraHeight;

            if (type == FollowViewType.Third)
            {
                distance = -3.7f;
                height   = 0.56f;
            }

            return(new Vector3(m_Camera.localPosition.x, height, distance));
        }
예제 #3
0
        public void Switch(FollowViewType type)
        {
            ViewType = type;
            Vector3 pos = GetPosition(type);
            Vector3 rot = GetRotate();

            IsSwitching = true;

            SwitchType(type);
            m_Camera.localPosition    = pos;
            m_Camera.localEulerAngles = rot;

            Debug.Log(pos);
            Debug.Log(rot);
        }
예제 #4
0
        public void SwitchFollowView(FollowViewType type)
        {
            this.viewType = type;
            switch (type)
            {
            case FollowViewType.First:
                HideBodys();
                m_mouseLook.Init(transform, Camera.transform);
                //if (!m_isNavigate){
                //    m_mouseLook.SetCursorLock(true);
                //}
                break;

            case FollowViewType.Third:
                ShowBodys();
                //m_mouseLook.SetCursorLock(false);
                break;
            }
        }