public void Init() { mCanGet = 0; if (UtilMgr.GetLastBackState() != UtilMgr.STATE.LiveBingo) { transform.root.FindChild("LiveBingo").gameObject.SetActive(true); transform.root.FindChild("LiveBingo").localPosition = new Vector3(2000f, 0); NetMgr.JoinGame(); mUpdateCnt = 0; mBingoResponse = null; mLineupResponse = null; mCallResponse = null; } IsReload = false; BoardOnly = false; IsNotReady = false; IsEnded = UserMgr.eventJoined.status.Equals("Final") ? true : false; ClearBoard(); mItemDic = new Dictionary <int, ItemBingo>(); transform.GetComponent <LiveBingoAnimation>().Init(); transform.FindChild("Body").FindChild("Scroll View").FindChild("Board").FindChild("Sprite") .FindChild("NotReady").gameObject.SetActive(false); mBingoEvent = new GetBingoEvent(ReceivedBingo); NetMgr.GetBingo(UserMgr.eventJoined.gameId, mBingoEvent); }
void ReceivedBingo() { if (mBingoEvent.Response == null) { return; } mBingoResponse = mBingoEvent.Response; mMsgCount = mBingoResponse.data.bingo.msgCount; InitBingoBoard(); if (IsNotReady) { return; } InitBingoBtn(); if (IsEnded) { DisableResetBtn(); } else { InitResetBtn(); } if (BoardOnly) { BoardOnly = false; return; } mLineupEvent = new GetCurrentLineupEvent(ReceivedLineup); NetMgr.GetCurrentLineup(UserMgr.eventJoined.gameId, UserMgr.eventJoined.inning, mBingoResponse.data.bingo.bingoId, mLineupEvent); }
void ReceivedBingo() { if(mBingoEvent.Response == null) return; mBingoResponse = mBingoEvent.Response; mMsgCount = mBingoResponse.data.bingo.msgCount; InitBingoBoard(); if(IsNotReady) return; InitBingoBtn(); if(IsEnded){ DisableResetBtn(); } else{ InitResetBtn(); } if(BoardOnly){ BoardOnly = false; return; } mLineupEvent = new GetCurrentLineupEvent(ReceivedLineup); NetMgr.GetCurrentLineup(UserMgr.eventJoined.gameId, UserMgr.eventJoined.inning, mBingoResponse.data.bingo.bingoId, mLineupEvent); }
public void Init() { mCanGet = 0; if(UtilMgr.GetLastBackState() != UtilMgr.STATE.LiveBingo){ transform.root.FindChild("LiveBingo").gameObject.SetActive(true); transform.root.FindChild("LiveBingo").localPosition = new Vector3(2000f, 0); NetMgr.JoinGame(); mUpdateCnt = 0; mBingoResponse = null; mLineupResponse = null; mCallResponse = null; } IsReload = false; BoardOnly = false; IsNotReady = false; IsEnded = UserMgr.eventJoined.status.Equals("Final") ? true : false; ClearBoard(); mItemDic = new Dictionary<int, ItemBingo>(); transform.GetComponent<LiveBingoAnimation>().Init(); transform.FindChild("Body").FindChild("Scroll View").FindChild("Board").FindChild("Sprite") .FindChild("NotReady").gameObject.SetActive(false); mBingoEvent = new GetBingoEvent(ReceivedBingo); NetMgr.GetBingo(UserMgr.eventJoined.gameId, mBingoEvent); }