void LateUpdate() { m_mouse.update(); switch (m_mouse.status) { case MouseStatus.Status.kDown: break; case MouseStatus.Status.kStartMove: if (World.Current.cameraCtrl.enabled) { World.Current.SetCameraFollowedEnabled(false); } m_cameraOrg = Camera.main.transform.position; if (m_recoverTimer) { CancelInvoke("RecoveryCameraFollow"); m_recoverTimer = false; } break; case MouseStatus.Status.kMove: Camera.main.transform.position = Camera.main.ScreenToWorldPoint(m_mouse.startMove) - m_mouse.nowWorld + m_cameraOrg; break; case MouseStatus.Status.kUp: if (m_mouse.moved) { if (m_recoverTimer) { CancelInvoke("RecoveryCameraFollow"); } Invoke("RecoveryCameraFollow", 2.0f); m_recoverTimer = true; } else { //Follow.enabled = true; Unit u = m_controlling; if (u != null) { bool touchUI = (Input.touchCount > 0 && EventSystem.current.IsPointerOverGameObject(Input.GetTouch(0).fingerId)) || EventSystem.current.IsPointerOverGameObject(); if (!touchUI) { localClient.CmdMove(u.Id, m_mouse.nowWorld, true); } } } break; default: break; } }