public static bool CanAddBet(this DragonTiger_GamePlay_Manager _gamePlayManager) { if (_gamePlayManager.currentGameState != DragonTiger_GamePlay_Manager.GameState.Bet) { #if TEST Debug.LogError(">>> Không ở trong trang đặt cược nên ko setup"); #endif return(false); } if (_gamePlayManager.dragonTigerCasinoData == null) { #if TEST Debug.LogError(">>> dragonTigerCasinoData is NULL"); #endif return(false); } if (_gamePlayManager.dragonTigerCasinoData.nextTimeToShowResult < System.DateTime.Now.AddSeconds(2f)) { #if TEST Debug.LogError(">>> Hết thời gian đặt cược"); #endif return(false); } return(true); }
private void OnDestroy() { StopAllCoroutines(); DataManager.instance.userData.RemoveTotalBetInGameInfo(IMiniGameInfo.Type.DragonTigerCasino); dragonTigerCasinoData = null; DragonTiger_RealTimeAPI.SelfDestruction(); instance = null; }
private void Awake() { instance = this; }