LobbyWindow.cs
public override void Init()
{
Debug.Log ("lobbywindow init");
EventCenter.AddListener(EGameEvent.eGameEvent_LobbyEnter, Show); //注意这一行
EventCenter.AddListener(EGameEvent.eGameEvent_LobbyExit, Hide);
}
//窗口控件初始化
protected override void InitWidget()
{
mBattle = mRoot.FindChild("StartMenuManager/StartMenuBtn/Battle").GetComponent<UIToggle>();
EventDelegate.Add(mBattle.onChange, OnBattleChange); //注意这一行
}
public override void OnEnable()
{
#if UNITY_STANDALONE_WIN || UNITY_EDITOR|| SKIP_SDK
#else
SdkConector.ShowToolBar(1);
#endif
Debug.Log("GameUserData.Instance.GameUserGold.ToString() " + GameUserModel.Instance.mGameUserGold.ToString());
mGoldText.text = GameUserModel.Instance.mGameUserGold.ToString();
mDiamondText.text = GameUserModel.Instance.mGameUserDmd.ToString();
//初始化
mBattle.value = true;
FR:海涛高软(hunk Xu ) QQ技术交流群:386476712