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; }
void OnMode2vs2() { m_eCurPvpMode = ePvpMode.ePvpMode_2; _SetModeStringColor( ePvpMode.ePvpMode_2); _SetPvpInfo( ePvpMode.ePvpMode_2); _SetImage_Mode( ePvpMode.ePvpMode_2); }
void OnMode1vs1() { m_eCurPvpMode = ePvpMode.ePvpMode_1; _SetModeStringColor( ePvpMode.ePvpMode_1); _SetPvpInfo( ePvpMode.ePvpMode_1); _SetImage_Mode( ePvpMode.ePvpMode_1); }
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; }
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; } }
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); }
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); }
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; }
void OnModeTrainning() { m_bTrainningMode = true; m_eCurPvpMode = _SortModeBtn( true); _SetPvpInfo( m_eCurPvpMode); _SetImage_Mode( m_eCurPvpMode); }
void OnModeRanking() { m_bTrainningMode = false; m_eCurPvpMode = _SortModeBtn( false); _SetPvpInfo( m_eCurPvpMode); _SetImage_Mode( m_eCurPvpMode); }
void OnMode4vs4() { m_eCurPvpMode = ePvpMode.ePvpMode_4; _SetModeStringColor( ePvpMode.ePvpMode_4); _SetPvpInfo( ePvpMode.ePvpMode_4); _SetImage_Mode( ePvpMode.ePvpMode_4); }
void OnMode3vs3() { m_eCurPvpMode = ePvpMode.ePvpMode_3; _SetModeStringColor( ePvpMode.ePvpMode_3); _SetPvpInfo( ePvpMode.ePvpMode_3); _SetImage_Mode( ePvpMode.ePvpMode_3); }