public void OnBetBtnClicked()
 {
     DartGameUtils.BetStructure betStruct = new DartGameUtils.BetStructure
     {
         BetAmount = gameUtil.betamountList[betAmountIndex],
         BetColour = colorIndex
     };
     GameManager.playerBets.Clear();
     GameManager.playerBets.Add(betStruct);
     PopupCanvas.SetActive(false);
 }
예제 #2
0
    void Start()
    {
        genericInfoPopup.gameObject.SetActive(false);
        userName.text = GameManager.userInfo.name;
        gameUtil      = new DartGameUtils();
        betAmount     = gameUtil.betamountList[gameUtil.betamountList.Length - 1];
        betColour     = UnityEngine.Random.Range(1, 7);
        GameManager.playerBets.Clear();
        DartGameUtils.BetStructure betStruct = new DartGameUtils.BetStructure
        {
            BetAmount = betAmount,
            BetColour = betColour
        };
        GameManager.playerBets.Add(betStruct);
        GameManager.GetInstance().SetCurrentGameMode(DartGameUtils.GameMode.SinglebetMode);

        betcolorIndicator.GetComponent <Image>().color = gameUtil.colourMap[betColour];
        betAmountDisplay.text = betAmount.ToString();
        isInitialized         = true;
    }