示例#1
0
	public void Open(GameObject goRoot)
	{
		gameObject.SetActiveRecursively( true);
		m_goRoot = goRoot;
		m_bTrainningMode = false;
		
		_ParsePvpData();
		
		_Init();
		m_eCurPvpMode = _SortModeBtn( false);

		_SetPvpInfo( m_eCurPvpMode);
		_SetUserInfo();
		_SetResultInfo();
		_SetImage_Mode( m_eCurPvpMode);
		
		AsPvpManager.Instance.m_bSendMatching = false;
	}
示例#2
0
	void OnMode2vs2()
	{
		m_eCurPvpMode = ePvpMode.ePvpMode_2;

		_SetModeStringColor( ePvpMode.ePvpMode_2);
		_SetPvpInfo( ePvpMode.ePvpMode_2);
		_SetImage_Mode( ePvpMode.ePvpMode_2);
	}
示例#3
0
	void OnMode1vs1()
	{
		m_eCurPvpMode = ePvpMode.ePvpMode_1;

		_SetModeStringColor( ePvpMode.ePvpMode_1);
		_SetPvpInfo( ePvpMode.ePvpMode_1);
		_SetImage_Mode( ePvpMode.ePvpMode_1);
	}
示例#4
0
	private void _SetImage_Mode(ePvpMode pvpMode)
	{
		Tbl_InDun_Record record = AsTableManager.Instance.GetInDunRecord( m_aPvpTableIndex[(int)pvpMode]);
		if( null == record)
			return;
		
		Texture tex = ResourceLoad.Loadtexture( record.Icon);
		m_ImgMode.renderer.material.mainTexture = tex;
	}
示例#5
0
	private void _SetModeBtn(bool bHide, bool bFirstActivate, ePvpMode eMode, Vector3 vPos)
	{
		switch( eMode)
		{
		case ePvpMode.ePvpMode_1:
			m_BtnPvp1.Hide( bHide);
			if( false == bHide)
			{
				m_BtnPvp1.transform.position = vPos;
				if( true == bFirstActivate)
					m_BtnPvp1.Text = m_ActiveTextColor + _GetModeNameString( ePvpMode.ePvpMode_1);
				else
					m_BtnPvp1.Text = Color.black + _GetModeNameString( ePvpMode.ePvpMode_1);
			}
			break;
			
		case ePvpMode.ePvpMode_2:
			m_BtnPvp2.Hide( bHide);
			if( false == bHide)
			{
				m_BtnPvp2.transform.position = vPos;
				if( true == bFirstActivate)
					m_BtnPvp2.Text = m_ActiveTextColor + _GetModeNameString( ePvpMode.ePvpMode_2);
				else
					m_BtnPvp2.Text = Color.black + _GetModeNameString( ePvpMode.ePvpMode_2);
			}
			break;
			
		case ePvpMode.ePvpMode_3:
			m_BtnPvp3.Hide( bHide);
			if( false == bHide)
			{
				m_BtnPvp3.transform.position = vPos;
				if( true == bFirstActivate)
					m_BtnPvp3.Text = m_ActiveTextColor + _GetModeNameString( ePvpMode.ePvpMode_3);
				else
					m_BtnPvp3.Text = Color.black + _GetModeNameString( ePvpMode.ePvpMode_3);
			}
			break;
			
		case ePvpMode.ePvpMode_4:
			m_BtnPvp4.Hide( bHide);
			if( false == bHide)
			{
				m_BtnPvp4.transform.position = vPos;
				if( true == bFirstActivate)
					m_BtnPvp4.Text = m_ActiveTextColor + _GetModeNameString( ePvpMode.ePvpMode_4);
				else
					m_BtnPvp4.Text = Color.black + _GetModeNameString( ePvpMode.ePvpMode_4);
			}
			break;
		}
	}
示例#6
0
	private void _SetModeStringColor(ePvpMode curMode)
	{
		m_BtnPvp1.Text = Color.black + _GetModeNameString( ePvpMode.ePvpMode_1);
		m_BtnPvp2.Text = Color.black + _GetModeNameString( ePvpMode.ePvpMode_2);
		m_BtnPvp3.Text = Color.black + _GetModeNameString( ePvpMode.ePvpMode_3);
		m_BtnPvp4.Text = Color.black + _GetModeNameString( ePvpMode.ePvpMode_4);

		if( ePvpMode.ePvpMode_1 == curMode)
			m_BtnPvp1.Text = m_ActiveTextColor + _GetModeNameString( ePvpMode.ePvpMode_1);
		else if( ePvpMode.ePvpMode_2 == curMode)
			m_BtnPvp2.Text = m_ActiveTextColor + _GetModeNameString( ePvpMode.ePvpMode_2);
		else if( ePvpMode.ePvpMode_3 == curMode)
			m_BtnPvp3.Text = m_ActiveTextColor + _GetModeNameString( ePvpMode.ePvpMode_3);
		else if( ePvpMode.ePvpMode_4 == curMode)
			m_BtnPvp4.Text = m_ActiveTextColor + _GetModeNameString( ePvpMode.ePvpMode_4);
	}
示例#7
0
	private void _SetPvpInfo(ePvpMode pvpMode)
	{
		Tbl_InDun_Record record = AsTableManager.Instance.GetInDunRecord( m_aPvpTableIndex[(int)pvpMode]);
		if( null == record)
			return;
		
//		int nCurCount = 0;
//		int nMaxCount = record.PvPLimitCount;
//		
//		if( ePvpMode.ePvpMode_1 == pvpMode)
//			nCurCount = AsPvpManager.Instance.m_nLimitCount1;
//		else if( ePvpMode.ePvpMode_2 == pvpMode)
//			nCurCount = AsPvpManager.Instance.m_nLimitCount2;
//		else if( ePvpMode.ePvpMode_3 == pvpMode)
//			nCurCount = AsPvpManager.Instance.m_nLimitCount3;
//		else if( ePvpMode.ePvpMode_4 == pvpMode)
//			nCurCount = AsPvpManager.Instance.m_nLimitCount4;
		
		m_TextModeDesc.Hide( false);
//		m_BtnCash.Hide( false);
		
//		m_TextModeInfo.Text = string.Format( AsTableManager.Instance.GetTbl_String( 920),
//			AsTableManager.Instance.GetTbl_String( record.Name), nCurCount.ToString(), nMaxCount.ToString());
		
//		m_TextModeDesc.Text = AsTableManager.Instance.GetTbl_String( record.Description);
		
		if( true == m_bTrainningMode)
		{
//			m_TextModeInfo.Text = AsTableManager.Instance.GetTbl_String( 893);
//			m_TextModeDesc.Hide( true);
//			m_BtnCash.Hide( true);
			m_TextModeDesc.Text = AsTableManager.Instance.GetTbl_String( 893);
		}
		else
			m_TextModeDesc.Text = AsTableManager.Instance.GetTbl_String( record.Description);
	}
示例#8
0
	private string _GetModeNameString(ePvpMode pvpMode)
	{
		Tbl_InDun_Record record = AsTableManager.Instance.GetInDunRecord( m_aPvpTableIndex[(int)pvpMode]);
		
		if( null != record)
			return AsTableManager.Instance.GetTbl_String( record.Name);
		
		return string.Empty;
	}
示例#9
0
	void OnModeTrainning()
	{
		m_bTrainningMode = true;
		m_eCurPvpMode = _SortModeBtn( true);
		_SetPvpInfo( m_eCurPvpMode);
		_SetImage_Mode( m_eCurPvpMode);
	}
示例#10
0
	void OnModeRanking()
	{
		m_bTrainningMode = false;
		m_eCurPvpMode = _SortModeBtn( false);
		_SetPvpInfo( m_eCurPvpMode);
		_SetImage_Mode( m_eCurPvpMode);
	}
示例#11
0
	void OnMode4vs4()
	{
		m_eCurPvpMode = ePvpMode.ePvpMode_4;

		_SetModeStringColor( ePvpMode.ePvpMode_4);
		_SetPvpInfo( ePvpMode.ePvpMode_4);
		_SetImage_Mode( ePvpMode.ePvpMode_4);
	}
示例#12
0
	void OnMode3vs3()
	{
		m_eCurPvpMode = ePvpMode.ePvpMode_3;

		_SetModeStringColor( ePvpMode.ePvpMode_3);
		_SetPvpInfo( ePvpMode.ePvpMode_3);
		_SetImage_Mode( ePvpMode.ePvpMode_3);
	}