void SwitchType(FollowViewType type) { if (type == FollowViewType.First) { m_Clip.CanClip = false; OnFirstSwitchCompeleted(); } else { OnThirdSwithcCompeleted(); } }
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)); }
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); }
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; } }