private void InstanceOnTouchBeganListeners(TouchEventParam obj) { if (obj.TouchCount < 1) { return; } var touchInfo = obj.GetTouch(0); m_bIsClick = true; m_sClickPosition = touchInfo.position; }
private void OnTouch(TouchEventParam obj) { Ray ray = Camera.main.ScreenPointToRay(obj.GetTouch(0).position); RaycastHit hitInfo; if (Physics.Raycast(ray, out hitInfo)) { if (PvpPlayerMgr.Instance.mainPlayer != null) { Unit unit = PvpPlayerMgr.Instance.mainPlayer.unit; if (unit != null) { unit.ReqMove(TSVector.FromUnitVector3(hitInfo.point)); } } } }