Example #1
0
    IEnumerator DoActionTest()
    {
        yield return(Yielders.Get(2f));

        Debug.Log(">>> Start Initdata");
        long _currentMilisecond = MyConstant.currentTimeMilliseconds;

        videoPokerGamePlayData = new SlotPokerGamePlayData();
        // videoPokerGamePlayData.GetListResultCardType(listCardDetail, new List<sbyte>());
        Debug.Log(videoPokerGamePlayData.totalCase + " -- " + (MyConstant.currentTimeMilliseconds - _currentMilisecond));

        // yield return Yielders.Get(2f);
        // Debug.Log(">>> Continue");
        // _currentMilisecond = MyConstant.currentTimeMilliseconds;
        // for(int i = 0; i < videoPokerGamePlayData.listResultCardType.Count; i++){
        //  for(int j = 0; j < videoPokerGamePlayData.listResultCardType[i].listTypecards.Count; j++){

        //  }
        // }

        // Debug.Log(MyConstant.currentTimeMilliseconds - _currentMilisecond);
    }
Example #2
0
    private void Start()
    {
        if (listCanvasGroupButtonHold.Count != numCol)
        {
            Debug.LogError(">>> Chưa kéo đủ " + numCol + " nút hold");
        }
        if (listCanvasGroupButtonUnHold.Count != numCol)
        {
            Debug.LogError(">>> Chưa kéo đủ " + numCol + " nút UnHold");
        }

        if (listCol.Count != numCol)
        {
            Debug.LogError(">>> Chưa kéo đủ " + numCol + " cột");
        }
        else
        {
            if (listCol[0].childCount != cardsInCol_00.Count)
            {
                Debug.LogError(">>> Bug phần tử của Col 00");
            }
            if (listCol[1].childCount != cardsInCol_01.Count)
            {
                Debug.LogError(">>> Bug phần tử của Col 01");
            }
            if (listCol[2].childCount != cardsInCol_02.Count)
            {
                Debug.LogError(">>> Bug phần tử của Col 02");
            }
            if (listCol[3].childCount != cardsInCol_03.Count)
            {
                Debug.LogError(">>> Bug phần tử của Col 03");
            }
            if (listCol[4].childCount != cardsInCol_04.Count)
            {
                Debug.LogError(">>> Bug phần tử của Col 04");
            }
        }

        if (listCardDetail.Count != 52)
        {
            Debug.LogError(">>> Chưa đủ bài");
        }
        for (int i = 0; i < listCanvasGroupButtonHold.Count; i++)
        {
            listCanvasGroupButtonHold[i].interactable = false;
        }
        for (int i = 0; i < listCanvasGroupButtonUnHold.Count; i++)
        {
            listCanvasGroupButtonUnHold[i].blocksRaycasts = false;
        }
        for (int i = 0; i < listTextHeld.Count; i++)
        {
            listTextHeld[i].alpha = 0f;
        }

        txtCardResult.text = string.Empty;
        Color _c = txtCardResult.color;

        _c.a = 0;
        txtCardResult.color = _c;

        for (int i = 0; i < listCol.Count; i++)
        {
            SetPos(listCol[i]);
        }
        myState     = State.NewRound;
        isFirstSpin = true;

        resultIndexCards    = new List <int>();
        listIndexGlobalCard = new List <int>();        // 0 -> 52
        for (int i = 0; i < listCardDetail.Count; i++)
        {
            listIndexGlobalCard.Add(i);
        }

        SetCardRandomInFirst();

        realMyGold = DataManager.instance.userData.gold;
        RefreshMyGoldInfo(true);
        LoadGoldFromServer();

        videoPokerGamePlayData = new SlotPokerGamePlayData();

        currentBet      = GameInformation.instance.slotPokerInfo.betDefault;
        listBetWinValue = new List <long>();
        long _bet = 0;

        for (int i = 0; i < GameInformation.instance.slotPokerInfo.listDetail.Count; i++)
        {
            _bet = (long)Mathf.Round(currentBet * GameInformation.instance.slotPokerInfo.listDetail[i].ratioWin);
            listBetWinValue.Add(_bet);
        }

        // StartCoroutine(DoActionTest());
        // StartCoroutine(DoActionTestAAAA());
    }