public void ShowWidnow(bool bShow) { bool bVisible = visible(); if (bVisible == bShow) { return; } set_visible(bShow); m_btnCancle.set_visible(bShow); m_btnOk.set_visible(bShow); m_btnMinus.set_visible(bShow); m_btnAdd.set_visible(bShow); m_sldNumber.set_visible(bShow); m_btnMinus1.set_visible(bShow); m_btnAdd1.set_visible(bShow); m_sldNumber1.set_visible(bShow); if (bShow) { try { Sound_Instance pSound = Root.instance().sound_manager().sound_instance(16); pSound.play(false, true); } catch { } } }
public void ShowWidnow(bool bIsShow) { CGameScene pGameScene = (CGameScene)parent(); bool bShow = (pGameScene.m_dwRoomType == 0) ? bIsShow : false; bool bVisible = visible(); if (bVisible == bShow) { return; } set_visible(bShow); m_btnCancle.set_visible(bShow); m_btnMax.set_visible(bShow); m_btnOk.set_visible(bShow); m_btnMinus.set_visible(bShow); m_btnAdd.set_visible(bShow); m_sldNumber.set_visible(bShow); if (bShow) { try { Sound_Instance pSound = Root.instance().sound_manager().sound_instance(16); pSound.play(false, true); } catch { } } if (bIsShow == true) { CClientKernel pClientKernel = pGameScene.GetClientKernel(); if (pClientKernel == null) { return; } UserInfo pUserData = pClientKernel.GetMeUserInfo(); if ((pUserData != null) && (pUserData.GetGameMoney() > 100)) { int nMeBuyCount = (pUserData.GetGameMoney() - 100) / m_lCellScore; m_nMaxBuyFishGold = (m_nMaxFishGold <= nMeBuyCount) ? m_nMaxFishGold : nMeBuyCount; } else { m_nMaxBuyFishGold = 0; } button_press(10011); } }