public void RefreshData(bool _hasNewTurn) { if (pokerGamePlayData == null || dataPlaying == null || pokerGamePlayData.currentGameState == PokerGamePlayData.GameState.STATUS_WAIT_FOR_PLAYER || dataPlaying.currentState == PokerGamePlayData.Poker_PlayerPlayingData.State.STATEPOKER_FOLD) { return; } if (dataPlaying.ownCards == null || dataPlaying.ownCards.Count != 2 || dataPlaying.ownCards[0] < 0 || dataPlaying.ownCards[1] < 0 || pokerGamePlayData.globalCards == null) { return; } if (_hasNewTurn && pokerGamePlayData.globalCards.Count >= 3) { PokerGamePlayData.GetPercentTypeCard(dataPlaying.ownCards, pokerGamePlayData.globalCards, (_percent) => { if (listOptions.Count != _percent.Length) { #if TEST Debug.LogError("BUG Logic!"); #endif } else { for (int i = 0; i < _percent.Length; i++) { valueCardRanking[i] = _percent[i]; listOptions[i].InitData(_percent[i]); } } }); } }
public void GetPercentTypeCard() { long _xxx = MyConstant.currentTimeMilliseconds; PokerGamePlayData.GetPercentTypeCard(ownCards, globalCards, (_percent) => { string _tmp = ""; for (int i = 0; i < _percent.Length; i++) { _tmp += ((PokerGamePlayData.TypeCardResult)i + 1).ToString() + ": " + _percent[i] + "% |"; } Debug.Log(">>> Get Percent Type Card: " + _tmp); Debug.Log("Time elapsed: " + (MyConstant.currentTimeMilliseconds - _xxx)); }); }