Esempio n. 1
0
    private void RPC_StartInitialize(bool _isBot)
    {
        PhotonPlayer botPhoton = null;

        isMine = photonView.isMine;
        isBot  = _isBot;

        if (isBot)
        {
            botPhoton = PhotonTexasPokerManager.instance.GetBotwithIndex(IDX_READONLY);// bots[PhotonTexasPokerManager.instance.bots.Count - 1];
        }
        if (botPhoton == null && isBot)
        {
            Debug.Log("GA DAPET BOT PHOTON BOS");
        }

        int ownerSlotIndex = PhotonUtility.GetPlayerProperties <int>(isBot ? botPhoton : this.photonView.owner, PhotonEnums.Player.SlotIndex);

        uiPlayerPoker = _PokerGameManager.instance.stockPlayers[ownerSlotIndex];
        uiPlayerPoker.gameObject.SetActive(true);
        uiPlayerPoker._myParasitePlayer = this;
        uiPlayerPoker.myPlayer          = isBot ? botPhoton : this.photonView.owner;
        nickname = isBot ? botPhoton.NickName : this.photonView.owner.NickName;

        transform.SetParent(uiPlayerPoker.transform);
        transform.localScale    = new Vector3(1, 1, 1);
        transform.localPosition = new Vector3(0, 0, 0);

        uiPlayerPoker.StartInitialize(ownerSlotIndex, isMine, isBot);

        if (isMine)
        {
            PhotonUtility.SetPlayerPropertiesArray(uiPlayerPoker.myPlayer, new string[] { PhotonEnums.Player.ReadyInitialized, PhotonEnums.Player.NextRoundIn }, new object[] { true, true });
        }
    }
Esempio n. 2
0
 public void AutoBuyIn()
 {
     SetMinMax();
     PlayerUtility.BuyInFromBankAccount(maxBuy);
     PhotonUtility.SetPlayerProperties(PhotonNetwork.player, PhotonEnums.Player.Money, maxBuy);
     _PokerGameManager.instance.unsortedPlayers[0].AutoBuyIn(maxBuy);
 }
Esempio n. 3
0
    private int GetAvailableRoomSlotIndex()
    {
        if (PhotonNetwork.room == null)
        {
            return(-1);
        }

        //Make the next available slot occupied
        int slot_index = -1;

        bool[] slots = PhotonUtility.GetRoomProperties <bool[]> (PhotonEnums.Room.Slots);

        //debug.LogError("Slot Count : " + slots.Length);

        bool bFoundNewIndex = false;

        for (int i = 0; i < slots.Length; i++)
        {
            if (slots[i] == false)
            {
                slot_index     = i;
                slots[i]       = true;
                bFoundNewIndex = true;
                break;
            }
        }

        if (bFoundNewIndex)
        {
            PhotonUtility.SetRoomProperties(PhotonEnums.Room.Slots, slots);
        }

        return(slot_index);
    }
Esempio n. 4
0
    public void OnSwitchTable(bool isRejoin = false)
    {
        if (GlobalVariables.gameType == GameType.TexasPoker)
        {
            if (PhotonNetwork.room != null || PhotonTexasPokerManager.instance.GetNumActivePlayers() <= 1)
            {
                if (!PhotonUtility.GetPlayerProperties <bool> (PhotonNetwork.player, PhotonEnums.Player.Active))
                {
                    GlobalVariables.bSwitchTableNextRound = false;
                    PhotonTexasPokerManager.instance.ImLeaving();
                    //StartCoroutine(_LoadSwitchTable());
                    LoadSwitchTable();
                }
                else if (PhotonTexasPokerManager.instance != null && PhotonTexasPokerManager.instance.GetNumActivePlayers() > 1 && !isRejoin)
                {
                    MessageManager.instance.Show(gameObject, "Apakah kamu yakin ingin pindah ke meja lain?", ButtonMode.OK_CANCEL, 2);
                }
                else
                {
                    GlobalVariables.bSwitchTableNextRound = false;
                    PhotonTexasPokerManager.instance.ImLeaving();
                    //StartCoroutine(_LoadSwitchTable());
                    LoadSwitchTable();
                }
            }
        }

        //Hide();
    }
Esempio n. 5
0
    void RPC_ReturnSicboSlot(int _mySlot)
    {
        Logger.E("rpc return sicbo slot");
        int mySlot = _mySlot;

        if (mySlot >= 0)
        {
            SortingStockPlayers(mySlot);
            PhotonUtility.SetPlayerProperties(PhotonNetwork.player, PhotonEnums.Player.SlotIndex, mySlot);
        }


        if (!PhotonNetwork.isMasterClient)
        {
            photonView.RPC(PhotonEnums.RPC.RequestSicboSync, PhotonTargets.Others);
            Invoke("AssignPlayer", 4f);
        }
        else
        {
            AssignPlayer();
        }

        if (PhotonNetwork.isMasterClient)
        {
            StartCoroutine(_PreparingRound());
        }
    }
Esempio n. 6
0
 void RPC_ForceSyncBotMoney(long _money)
 {
     if (uiPlayerPoker.myPlayer != null)
     {
         PhotonUtility.SetPlayerProperties(uiPlayerPoker.myPlayer, PhotonEnums.Player.Money, _money);
         uiPlayerPoker.SyncMoney();
     }
 }
Esempio n. 7
0
    void RPC_RequestSicboSlot(PhotonMessageInfo info)
    {
        Logger.E("rpc_request sicbo slot");
        SyncSlots();
        int _available_slot = GetAvailableRoomSlotIndex();

        PhotonUtility.SetPlayerProperties(info.sender, PhotonEnums.Player.SlotIndex, _available_slot);
        photonView.RPC(PhotonEnums.RPC.ReturnSicboSlot, info.sender, _available_slot);
    }
Esempio n. 8
0
        public int Compare(PhotonPlayer x, PhotonPlayer y)
        {
            PhotonPlayer playerX = x;
            PhotonPlayer playerY = y;
            //Sort by descending scores order
            int scoreX = PhotonUtility.GetPlayerProperties <int>(playerX, PhotonEnums.Player.SlotIndex);
            int scoreY = PhotonUtility.GetPlayerProperties <int>(playerY, PhotonEnums.Player.SlotIndex);

            return((scoreX).CompareTo(scoreY));
        }
Esempio n. 9
0
    void UpdateUIPlayer()
    {
        panelBet.SetActive(totalBet <= 0 ? false : true);
        txtBet.text     = totalBet.toFlexibleCurrency();
        txtMyMoney.text = myMoney.toFlexibleCurrency();

        if (isMine || isBot)
        {
            PhotonUtility.SetPlayerPropertiesArray(myPlayer, new string[] { PhotonEnums.Player.Money, PhotonEnums.Player.TotalBet, PhotonEnums.Player.ChipsBet }, new object[] { myMoney, totalBet, chipsBet });
        }
    }
Esempio n. 10
0
    private void onSuccessJoinRoom(bool val)
    {
        ExitGames.Client.Photon.Hashtable properties = PhotonNetwork.room.CustomProperties;
        if (!properties.ContainsKey(PhotonEnums.Room.Slots))
        {
            if (GlobalVariables.gameType == GameType.TexasPoker)
            {
                PhotonUtility.SetRoomProperties(PhotonEnums.Room.Slots, new bool[8] {
                    false, false, false, false, false, false, false, false
                });
            }
            else if (GlobalVariables.gameType == GameType.Sicbo)
            {
                PhotonUtility.SetRoomProperties(PhotonEnums.Room.Slots, new bool[10] {
                    false, false, false, false, false, false, false, false, false, false
                });
            }
        }

        string strBetType  = PhotonUtility.GetRoomProperties <string>(PhotonEnums.Room.BetType);
        string strPassword = PhotonUtility.GetRoomProperties <string> (PhotonEnums.Room.Password);

        Logger.E("join room pass: "******"bIsPassword: "******"gems")
        {
            GlobalVariables.bIsCoins = false;
        }
        else
        {
            GlobalVariables.bIsCoins = true;
        }


        if (PlayerPrefs.GetString(PrefEnum.PHOTON_ROOM_NAME.ToString(), string.Empty).Equals(PhotonNetwork.room.Name))
        {
            Debug.LogError("if 1: " + PhotonNetwork.room.Name);
            //PokerManager.instance.uiOthers.OnSwitchTable(true);
            SwitchingRoom();
        }
        else
        {
            StartCoroutine(LoadGame());
        }
        //HomeSceneManager.Instance.HitAbsent(PhotonNetwork.room.Name);
    }
Esempio n. 11
0
    public void Initiate(int _slotIndex, bool _isMine)
    {
        slotIndex = _slotIndex;
        isMine    = _isMine;
        strBets   = string.Empty;

        ExitGames.Client.Photon.Hashtable properties = photonPlayer.CustomProperties;
        displayName = (string)properties[PhotonEnums.Player.Name];
        coinOwned   = (long)properties[PhotonEnums.Player.Money];
        //textDisplayName.text = displayName;
        textCoinValue.text = coinOwned.toShortCurrency();
        PhotonUtility.SetPlayerProperties(photonPlayer, PhotonEnums.Player.Money, coinOwned);
    }
Esempio n. 12
0
        public void StartFirstTurn()
        {
            indexLastDealer = GetIndexValueRound(indexLastDealer, matchPlayers.Count);

            if (PhotonNetwork.isMasterClient)
            {
                PhotonUtility.SetRoomProperties(PhotonEnums.Room.LastIndexDealer, indexLastDealer);
            }

            phaseTurn = 0;

            instance.AddPot(0, 0, currentPlayers.ToArray());

            if (currentPlayers.Count > 2)
            {
                lastBet = startBet;

                currentPlayers[indexLastDealer].SetMyRole(_GameRoleEnums.Dealer);
                instance.chipD.SetActive(true);
                LeanTween.move(instance.chipD, currentPlayers[indexLastDealer].chipsD, 1f);

                currentPlayers[GetIndexValueRound(indexLastDealer, matchPlayers.Count)].SetMyRole(_GameRoleEnums.SmallBlind);
                currentPlayers[GetIndexValueRound(indexLastDealer + 1, matchPlayers.Count)].SetMyRole(_GameRoleEnums.BigBlind);

                turnNow = currentPlayers[GetIndexValueRound(indexLastDealer + 1, matchPlayers.Count)];
            }
            else if (currentPlayers.Count == 2)
            {
                lastBet = startBet;
                instance.chipD.SetActive(false);
                currentPlayers[indexLastDealer].SetMyRole(_GameRoleEnums.SmallBlind);
                currentPlayers[GetIndexValueRound(indexLastDealer, matchPlayers.Count)].SetMyRole(_GameRoleEnums.BigBlind);

                turnNow = currentPlayers[GetIndexValueRound(indexLastDealer, matchPlayers.Count)];
            }

            UpdatePlayerNextTurn();  //To Initialize the Next Turn Player before Start Game

            if (PhotonUtility.GetPlayerProperties <bool> (PhotonNetwork.player, PhotonEnums.Player.Active))
            {
                if (!nextTurn.isMine || nextTurn.isBot)
                {
                    instance.unsortedPlayers[0].panelPreAction.SetActive(true);
                }
            }

            StartNextTurn();
        }
Esempio n. 13
0
 public void StartRound()
 {
     txtTimer.text = "0";
     if (PhotonUtility.GetPlayerProperties <bool> (PhotonNetwork.player, PhotonEnums.Player.ReadyInitialized))
     {
         PhotonUtility.SetPlayerPropertiesArray(PhotonNetwork.player, new string[] { PhotonEnums.Player.Active, PhotonEnums.Player.NextRoundIn }, new object[] { true, true });
     }
     else
     {
         PhotonUtility.SetPlayerPropertiesArray(PhotonNetwork.player, new string[] { PhotonEnums.Player.Active, PhotonEnums.Player.NextRoundIn }, new object[] { false, false });
     }
     if (crStartRound != null)
     {
         StopCoroutine(crStartRound);
     }
     crStartRound = StartCoroutine(_StartTimer(15f));
 }
Esempio n. 14
0
 private void PrepareStartSicbo()
 {
     apiPlayers = null;
     for (int i = 0; i < unsortedPlayers.Length; i++)
     {
         if (unsortedPlayers[i].photonPlayer != null)
         {
             long lCoin = PhotonUtility.GetPlayerProperties <long> (unsortedPlayers[i].photonPlayer, PhotonEnums.Player.Money);
             unsortedPlayers[i].textCoinValue.text = lCoin.toShortCurrency();
             string strBets = PhotonUtility.GetPlayerProperties <string> (unsortedPlayers[i].photonPlayer, PhotonEnums.Player.SICBO_BETS);
             if (strBets.Length != 0 && strBets != string.Empty)
             {
                 AppendPlayers(FormatBets(strBets));
             }
         }
     }
 }
Esempio n. 15
0
    public void Show()
    {
        Logger.E("a");
        gameObject.SetActive(true);
        //Only call it for one time since show is sending two time to the round restart

        if (PhotonNetwork.isMasterClient)
        {
            if (GlobalVariables.gameType == GameType.TexasPoker)
            {
                SetupPoker();
            }
        }

        //Don't allow any other players to be in this round
        PhotonPlayer[] _bots = PhotonTexasPokerManager.instance.bots.ToArray();
        foreach (PhotonPlayer bot in _bots)
        {
            if (PhotonUtility.GetPlayerProperties <bool>(bot, PhotonEnums.Player.ReadyInitialized))
            {
                PhotonUtility.SetPlayerPropertiesArray(bot, new string[] { PhotonEnums.Player.Active, PhotonEnums.Player.NextRoundIn }, new object[] { true, true });
            }
            else
            {
                PhotonUtility.SetPlayerPropertiesArray(bot, new string[] { PhotonEnums.Player.Active, PhotonEnums.Player.NextRoundIn }, new object[] { false, false });
            }
        }

        //Reset bet money to calculate giftpoints
        GlobalVariables.playerBetMoney = 0;

        if (PhotonUtility.GetPlayerProperties <bool>(PhotonNetwork.player, PhotonEnums.Player.ReadyInitialized))
        {
            PhotonUtility.SetPlayerPropertiesArray(PhotonNetwork.player, new string[] { PhotonEnums.Player.Active, PhotonEnums.Player.NextRoundIn }, new object[] { true, true });
        }
        else
        {
            PhotonUtility.SetPlayerPropertiesArray(PhotonNetwork.player, new string[] { PhotonEnums.Player.Active, PhotonEnums.Player.NextRoundIn }, new object[] { false, false });
        }

        if (GlobalVariables.gameType == GameType.TexasPoker)
        {
            StartCoroutine(StartRoundTimerPoker());
        }
    }
Esempio n. 16
0
 private void UpdateMoneyProperties(JSicboPlayer[] players)
 {
     for (int i = 0; i < players.Length; i++)
     {
         for (int j = 0; j < unsortedPlayers.Length; j++)
         {
             if (unsortedPlayers[j].photonPlayer != null)
             {
                 Logger.E("nn: " + unsortedPlayers[j].photonPlayer.NickName);
                 if (unsortedPlayers[j].photonPlayer.NickName == players[i].player_id.ToString())
                 {
                     Logger.E("Player id: " + players[i].player_id);
                     PhotonUtility.SetPlayerProperties(unsortedPlayers[j].photonPlayer, PhotonEnums.Player.Money, long.Parse(players[i].coin_after));
                 }
             }
         }
     }
 }
Esempio n. 17
0
        public void SyncCurrentMatchPlayers(string[] sCp)    //, string[] sMp
        {
            currentPlayers.Clear();
            matchPlayers.Clear();

            foreach (_PlayerPokerActor pA in instance.stockPlayers)
            {
                bool bActive = PhotonUtility.GetPlayerProperties <bool> (pA.myPlayer, PhotonEnums.Player.Active);
                if (bActive)
                {
                    matchPlayers.Add(pA);
                }
            }

            for (int a = 0; a < sCp.Length; a++)
            {
                currentPlayers.Add(instance.stockPlayers[int.Parse(sCp[a])]);
            }
        }
Esempio n. 18
0
    public void ResetProperties()
    {
        StopCoroutine("MyTurnStart");

        UI_allin(false);

        panelPreAction.SetActive(false);
        panelState.gameObject.SetActive(false);
        panelBet.SetActive(false);
        panelTxtRankHand.SetActive(false);
        if (imgHandRank != null)
        {
            imgHandRank.gameObject.SetActive(false);
        }

        forceFold  = false;
        isFolded   = false;
        alreadyBet = false;

        chipsBet = 0;
        totalBet = 0;

        if (isMine || isBot)
        {
            if (myPlayer != null)
            {
                PhotonUtility.SetPlayerProperties(myPlayer, PhotonEnums.Player.TotalBet, totalBet);
            }
        }

        txtRole.text     = "";
        panelState.color = Color.white;
        txtBet.text      = "";
        txtHandRank.text = "";

        objCD.SetActive(false);
        DeactiveChips();

        ClearPreAction();

        hero.Revert();
        //avater3D.ChangeSkinColor(Color.white);
    }
Esempio n. 19
0
    public void SyncMoney() //In Case Not Sync
    {
        if (myPlayer == null)
        {
            return;
        }

        if (!isMine || isBot)
        {
            myMoney = PhotonUtility.GetPlayerProperties <long>(myPlayer, PhotonEnums.Player.Money);
        }

        if (isBot && PhotonNetwork.isMasterClient)
        {
            _myParasitePlayer.photonView.RPC(PhotonEnums.RPC.RPC_ForceSyncBotMoney, PhotonTargets.Others, myMoney);
        }

        txtMyMoney.text = myMoney.toFlexibleCurrency();
    }
Esempio n. 20
0
    IEnumerator _UpdateMyUIPlayer(long chips)
    {
        yield return(_WFSUtility.wfs1);

        long prevMoney = myMoney - chips;

        trPanelMoney.SetAsLastSibling();

        float originalX = trPanelMoney.sizeDelta.x;
        float originalY = trPanelMoney.sizeDelta.y;

        trPanelMoney.sizeDelta = new Vector2(originalX + 500f, originalY);
        LeanTween.scale(trPanelMoney.gameObject, new Vector3(1.2f, 1.2f, 1.2f), 0.25f).setEaseOutBounce();
        long currentMoney = prevMoney;
        long counter      = 10;

        if (GlobalVariables.bIsCoins)
        {
            currentMoney *= 1000;
            chips        *= 1000;
        }
        long betPer = chips / counter;

        while (counter != 0)
        {
            currentMoney   += betPer;
            txtMyMoney.text = currentMoney.ToString("N0");

            counter--;
            yield return(_WFSUtility.wfs003);
        }
        LeanTween.scale(trPanelMoney.gameObject, Vector3.one, 0.25f).setEaseOutBounce();
        trPanelMoney.sizeDelta = new Vector2(originalX, originalY);
        trPanelMoney.SetSiblingIndex(1);
        if (myMoney <= 0)
        {
            myMoney = 0;
        }

        txtMyMoney.text = myMoney.toFlexibleCurrency();

        PhotonUtility.SetPlayerProperties(myPlayer, PhotonEnums.Player.Money, myMoney);
    }
Esempio n. 21
0
    private void UpdateMoneyUI()
    {
        for (int i = 0; i < unsortedPlayers.Length; i++)
        {
            if (unsortedPlayers[i].photonPlayer != null)
            {
                long lCoin = PhotonUtility.GetPlayerProperties <long> (unsortedPlayers[i].photonPlayer, PhotonEnums.Player.Money);
                if (unsortedPlayers[i].photonPlayer.NickName == PlayerData.id.ToString())
                {
                    long lCoinDiff = lCoin - PlayerData.owned_coin;
                    unsortedPlayers[i].SetTextCoinDiff(lCoinDiff);
                    PlayerData.owned_coin = lCoin;
                    _SceneManager.instance.UpdateAllCoinAndCoupon();
                }

                unsortedPlayers[i].textCoinValue.text = lCoin.toShortCurrency();
            }
        }
    }
Esempio n. 22
0
        public void UpdatePlayerForMatch()
        {
            currentPlayers.Clear();
            matchPlayers.Clear();

            //debug.Log("stock : " + instance.stockPlayers.Length);

            foreach (_PlayerPokerActor pA in instance.stockPlayers)
            {
                bool bActive = PhotonUtility.GetPlayerProperties <bool> (pA.myPlayer, PhotonEnums.Player.Active);
                if (bActive)
                {
                    currentPlayers.Add(pA);
                    matchPlayers.Add(pA);
                }
            }

            //debug.Log("CURRENT PLAYERS : " + currentPlayers.Count);
        }
Esempio n. 23
0
    private void RPC_Initiate()
    {
        int ownerSlotIndex = PhotonUtility.GetPlayerProperties <int> (this.photonView.owner, PhotonEnums.Player.SlotIndex);

        uiPlayer = SicboManager.instance.stockPlayers[ownerSlotIndex];
        uiPlayer.gameObject.SetActive(true);
        uiPlayer.parasite     = this;
        uiPlayer.photonPlayer = this.photonView.owner;
        nickname = this.photonView.owner.NickName;

        transform.SetParent(uiPlayer.transform);
        transform.localScale    = new Vector3(1, 1, 1);
        transform.localPosition = new Vector3(0, 0, 0);

        uiPlayer.Initiate(ownerSlotIndex, photonView.isMine);
        if (photonView.isMine)
        {
            Logger.W("is mine set player properties array");
            PhotonUtility.SetPlayerPropertiesArray(uiPlayer.photonPlayer, new string[] { PhotonEnums.Player.ReadyInitialized, PhotonEnums.Player.NextRoundIn }, new object[] { true, true });
        }
    }
Esempio n. 24
0
    public void AssignPlayer()
    {
        int slot_index = PhotonUtility.GetPlayerProperties <int> (PhotonNetwork.player, PhotonEnums.Player.SlotIndex);

        if (slot_index == -1)
        {
            PhotonUtility.SetPlayerProperties(PhotonNetwork.player, PhotonEnums.Player.SlotIndex, GetAvailableRoomSlotIndex());
            return;
        }

        //Check whether the game is already started
        ExitGames.Client.Photon.Hashtable playerProperties = PhotonNetwork.player.CustomProperties;
        playerProperties[PhotonEnums.Player.ContentURL] = PlayerData.costume_id;
        playerProperties[PhotonEnums.Player.PlayerID]   = PlayerData.id;
        playerProperties[PhotonEnums.Player.IsBot]      = false;
        playerProperties[PhotonEnums.Player.Name]       = PlayerData.display_name;
        playerProperties[PhotonEnums.Player.Gender]     = 0;
        playerProperties[PhotonEnums.Player.PictureURL] = string.Empty;
        PhotonNetwork.player.SetCustomProperties(playerProperties);

        objPlayers[slot_index].photonView.TransferOwnership(PhotonNetwork.player);
        objPlayers[slot_index].Initiate();
    }
Esempio n. 25
0
    public void ResetNextRound()
    {
        chipsBet = 0;

        if (isMine || isBot)
        {
            if (myPlayer != null)
            {
                PhotonUtility.SetPlayerProperties(myPlayer, PhotonEnums.Player.ChipsBet, chipsBet);
            }
        }

        alreadyBet       = false;
        txtRole.text     = "";
        panelState.color = Color.white;

        ClearPreAction();

        if (!isFolded)
        {
            panelState.gameObject.SetActive(false);
        }
    }
Esempio n. 26
0
    private void SyncSlots()
    {
        if (PhotonNetwork.isMasterClient)
        {
            bool[] slots = PhotonUtility.GetRoomProperties <bool[]> (PhotonEnums.Room.Slots);
            for (int i = 0; i < slots.Length; i++)
            {
                slots[i] = false;
            }

            foreach (PhotonPlayer player in PhotonNetwork.playerList)
            {
                int slotIndex = PhotonUtility.GetPlayerProperties <int> (player, PhotonEnums.Player.SlotIndex);

                if (slotIndex != -1)
                {
                    slots[slotIndex] = true;
                }
            }

            PhotonUtility.SetRoomProperties(PhotonEnums.Room.Slots, slots);
        }
    }
Esempio n. 27
0
    private void OnQuitGame()
    {
        //Debug.LogError ("Quit Game");
        if (GlobalVariables.gameType == GameType.TexasPoker)
        {
            if (PhotonNetwork.room != null || PhotonTexasPokerManager.instance.GetNumActivePlayers() <= 1)
            {
                Logger.E("Quit Game 1");
                if (!PhotonUtility.GetPlayerProperties <bool> (PhotonNetwork.player, PhotonEnums.Player.Active))
                {
                    GlobalVariables.bQuitOnNextRound = false;
                    PhotonTexasPokerManager.instance.ImLeaving();

                    Logger.E("Quit Game 2");
                    LoadMenu();
                }
                else if (PhotonTexasPokerManager.instance != null && PhotonTexasPokerManager.instance.GetNumActivePlayers() > 1)
                {
                    Logger.E("Quit Game55");
                    MessageManager.instance.Show(gameObject, "Keluar Ruangan", ButtonMode.OK_CANCEL, 1);
                }
                else
                {
                    GlobalVariables.bQuitOnNextRound = false;
                    PhotonTexasPokerManager.instance.ImLeaving();
                    LoadMenu();
                }
            }
            else
            {
                LoadMenu();
            }
        }

        //Hide();
    }
Esempio n. 28
0
    IEnumerator _PreparingRound()
    {
        PhotonUtility.SetRoomProperties(PhotonEnums.Room.MasterClientID, PhotonNetwork.player.UserId);
        PhotonUtility.SetRoomProperties(PhotonEnums.Room.IS_PLAYING, true);

        //int readyCount = 0;
        //yield return _WFSUtility.wfs2;
        //foreach (PhotonPlayer player in PhotonNetwork.playerList)
        //{
        //    bool bReady = PhotonUtility.GetPlayerProperties<bool> (player, PhotonEnums.Player.ReadyInitialized);
        //    Logger.E (bReady.ToString());
        //    if (bReady)
        //        readyCount++;
        //}
        //if (SicboTimer.instance == null)
        //{
        //    GameObject objTimer = PhotonNetwork.InstantiateSceneObject ("PhotonObjectTimer", Vector3.zero, Quaternion.identity, 0, new object[] { });
        //    SicboTimer.instance.SetScaleZ (15f);
        //}

        yield return(_WFSUtility.wfs2);

        PrepareSicboRound();
    }
Esempio n. 29
0
 void SyncBet(long _chipsBet, long _totalBet)
 {
     myMoney  = PhotonUtility.GetPlayerProperties <long>(myPlayer, PhotonEnums.Player.Money);
     chipsBet = _chipsBet;
     totalBet = _totalBet;
 }
Esempio n. 30
0
 public void AutoBuyIn(long valMoney)
 {
     myMoney         = valMoney;
     txtMyMoney.text = myMoney.toFlexibleCurrency();
     PhotonUtility.SetPlayerProperties(myPlayer, PhotonEnums.Player.Money, myMoney);
 }