Example #1
0
 private void OnDestroy()
 {
     bol_Table_Info = null;
     BolNetworkReceiving.SelfDestruction();
     //StopControlMatrix();
     //StopCurrentMatrix();
     instance   = null;
     screenChat = null;
 }
    public override void InitData(bool _isFullScreen, bool _connectFirst, System.Action _onFinished = null)
    {
        currentGameState = GameState.Bet;

        panelUserInGame.InitData();
        iconNotificationChat.SetActive(false);

        effectPoolManager     = new MySimplePoolManager();
        listProcessPlaying    = new List <IEnumerator>();
        listProcessNonPlaying = new List <IEnumerator>();

        screenChat = ((GameObject)Instantiate(screenChatPrefab, transform)).GetComponent <ScreenChatController>();

        isFullScreen = _isFullScreen;
        if (isFullScreen)
        {
            ratioScale             = 1f;
            myContainer.localScale = Vector3.one * ratioScale;
            btnClose.gameObject.SetActive(false);
            btnMiniGame.SetActive(true);
            btnShop.SetActive(true);
            btnSetting.SetActive(true);
            btnChat.SetActive(true);
        }
        else
        {
            ratioScale             = 0.8f;
            myContainer.localScale = Vector3.one * ratioScale;
            btnClose.gameObject.SetActive(true);
            btnClose.transform.position = btnClose_PlaceHolder.position;

            Vector3 _tmpPosUserInfo = panelUserInGame.transform.position;
            _tmpPosUserInfo.x -= 0.4f;
            panelUserInGame.transform.position = _tmpPosUserInfo;

            btnMiniGame.SetActive(false);
            btnShop.SetActive(false);
            btnSetting.SetActive(true);
            btnChat.SetActive(true);
        }

        posistionSpawnCard    = CoreGameManager.instance.currentSceneManager.mainCamera.transform.position;
        posistionSpawnCard.y += CoreGameManager.instance.currentSceneManager.mainCamera.sizeOfCamera.y / 2 + 3f;
        posistionSpawnCard.z  = 0f;

        cardDragon = null;
        cardTiger  = null;

        dragonTigerCasinoData = new DragonTigerCasinoData();

        panelListChip.InitData();

        StartCoroutine(DoActionRun(_connectFirst, _onFinished));
    }
    void InitData()
    {
        currentState          = State.Bet;
        callbackManager       = new AnimalRacing_CallbackManager();
        animalRacingData      = new AnimalRacingData();
        listProcessPlaying    = new List <IEnumerator>();
        listProcessNonPlaying = new List <IEnumerator>();
        shadowChangeScreen.gameObject.SetActive(false);
        HideIconNotificationChat();
        betManager.InitData();

        screenChat       = ((GameObject)Instantiate(screenChatPrefab, transform)).GetComponent <ScreenChatController>();
        popupChatManager = ((GameObject)Instantiate(popupChatManagerPrefab, transform)).GetComponent <PopupChatManager>();

        // -------- Init Callback -------- //
        InitAllCallback();
        // ------------------------------- //
    }