void InitAllCallback() { callbackManager = new Koprok_CallbackManager(); callbackManager.onDestructAllObject = () => { effectPoolManager.ClearAllObjectsNow(); panelListChip.SelfDestruction(); panelHistory.SelfDestruction(); screenChat.SelfDestruction(); if (onPressBack != null) { CoreGameManager.instance.RemoveCurrentCallbackPressBackKey(onPressBack); onPressBack = null; } }; callbackManager.onStartShowBet += () => { panelUserInGame.RefreshGoldInfo(); panelListChip.SetFocusChipAgain(); RefreshUITableBet(); StartCountDown(); }; callbackManager.onStartShowResult += () => { panelHistory.Hide(); }; callbackManager.onEndShowResult += () => { if (koprokData.myIndexBet == null) { koprokData.myIndexBet = new List <IndexBet>(); } else { koprokData.myIndexBet.Clear(); } }; screenChat.onSendMessage = (_mess) => { Koprok_RealTimeAPI.instance.SendMessageChat(_mess); }; screenChat.onStartShow += HideIconNotificationChat; screenChat.onHasNewMessage += ShowIconNotificationChat; }
void InitAllCallback() { callbackManager = new DragonTiger_CallbackManager(); callbackManager.onDestructAllObject = () => { effectPoolManager.ClearAllObjectsNow(); panelListChip.SelfDestruction(); if (cardDragon != null) { cardDragon.SelfDestruction(); cardDragon = null; } if (cardTiger != null) { cardTiger.SelfDestruction(); cardTiger = null; } screenChat.SelfDestruction(); if (onPressBack != null) { CoreGameManager.instance.RemoveCurrentCallbackPressBackKey(onPressBack); onPressBack = null; } }; callbackManager.onStartShowBet += () => { panelUserInGame.RefreshGoldInfo(); panelListChip.SetFocusChipAgain(); RefreshUITableBet(); StartCountDown(); DealCards(0.5f); }; callbackManager.onStartShowResult += () => { panelHistory.Hide(); }; screenChat.onSendMessage = (_mess) => { DragonTiger_RealTimeAPI.instance.SendMessageChat(_mess); }; screenChat.onStartShow += HideIconNotificationChat; screenChat.onHasNewMessage += ShowIconNotificationChat; }