private void _PlayPvpResultAction(GameObject goWinLoseDraw, ePVPRESULT ePvpResult) { //string strPrefab = ""; string strSnd = ""; switch( ePvpResult) { case ePVPRESULT.ePVPRESULT_WIN: //strPrefab = "UI/AsGUI/PVP/GUI_PVP_Result_Win"; strSnd = "Sound/PC/Common/Se_Common_PvPVictory"; break; case ePVPRESULT.ePVPRESULT_LOSE: //strPrefab = "UI/AsGUI/PVP/GUI_PVP_Result_Lose"; strSnd = "Sound/PC/Common/Se_Common_PvPLose"; break; case ePVPRESULT.ePVPRESULT_DRAW: //strPrefab = "UI/AsGUI/PVP/GUI_PVP_Result_Draw"; strSnd = "Sound/PC/Common/Se_Common_PvPDraw"; break; } //m_goPvpResultAction = Instantiate( Resources.Load( strPrefab)) as GameObject; m_goPvpResultAction = Instantiate( goWinLoseDraw) as GameObject; UIPanel panel = m_goPvpResultAction.GetComponent<UIPanel>(); panel.BringIn(); AsUserEntity userEntity = AsUserInfo.Instance.GetCurrentUserEntity(); if( null != userEntity) AsSoundManager.Instance.PlaySound( strSnd, userEntity.ModelObject.transform.position, false); else Debug.Log( "AsPvpRewardDlg::Open(), null == userEntity"); }
private void _UpdatePvpResult(ePVPRESULT ePvpResult) { m_goWin.SetActiveRecursively( false); m_goLose.SetActiveRecursively( false); m_goDraw.SetActiveRecursively( false); switch( ePvpResult) { case ePVPRESULT.ePVPRESULT_WIN: m_goWin.SetActiveRecursively( true); break; case ePVPRESULT.ePVPRESULT_LOSE: m_goLose.SetActiveRecursively( true); break; case ePVPRESULT.ePVPRESULT_DRAW: m_goDraw.SetActiveRecursively( true); break; } }