protected override void OnOpen(object userData) { base.OnOpen(userData); if (userData != null) { m_InfoFormData = userData as InfoFormData; } RegTouchEvts(); SetActive(transDetail, false); RefreshUI(); }
private void OpenInfoWnd() { StopNavTask(); if (m_CharCamTrans == null) { m_CharCamTrans = GameObject.FindGameObjectWithTag("CharShowCam").transform; } //设置人物展示相机相对位置 m_CharCamTrans.localPosition = m_PlayerCtrl.transform.position + m_PlayerCtrl.transform.forward * 3.8f + new Vector3(0, 1.2f, 0); m_CharCamTrans.localEulerAngles = new Vector3(0, 180 + m_PlayerCtrl.transform.localEulerAngles.y, 0); m_CharCamTrans.localScale = Vector3.one; m_CharCamTrans.gameObject.SetActive(true); m_InfoFormData = new InfoFormData(); m_InfoFormData.OnClickDown = SetStartRoate; m_InfoFormData.OnDrag = SetPlayerRoate; m_InfoFormData.OnClickClose = CloseInfoWnd; GameEntry.UI.OpenUIForm(UIFormId.InfoForm, m_InfoFormData); }