public IEnumerator ConfigDice() { yield return(new WaitForSeconds(0.2f)); if (stayAway) { stayAway = false; this.photonView.RPC("NextPlayer_CMD", RpcTarget.All, true); yield break; } if (!botController) { this.btnThrowDice.interactable = true; this.btnThrowDice.gameObject.SetActive(true); this.btnThrowDice.onClick.RemoveAllListeners(); this.btnThrowDice.onClick.AddListener(() => { int dice1 = dice1special == 0 ? ThrowDice() : dice1special; int dice2 = dice2special == 0 ? ThrowDice() : dice2special; photonView.RPC("RollDice_CMD", RpcTarget.All, dice1, dice2); this.moveController.StartMovePlayer(dice1, dice2); this.btnThrowDice.interactable = false; this.btnThrowDice.gameObject.SetActive(false); }); //this.btnThrowDice.image.color = mainColor; } else { //BOT StartCoroutine(botController.ExecuteAction(() => { int dice1 = dice1special == 0 ? ThrowDice() : dice1special; int dice2 = dice2special == 0 ? ThrowDice() : dice2special; photonView.RPC("RollDice_CMD", RpcTarget.All, dice1, dice2); this.moveController.StartMovePlayer(dice1, dice2); })); } }