예제 #1
0
    public void SetupBidUI(int maxBid, string leaderName, bool isIndianRound)
    {
        BidEvent = new BidSelectedEvent();
        int   numButtons      = maxBid + 1;
        float cardSpacing     = 17.0f;
        float firstCardOffset = -1 * (numButtons - 1) / 2.0f * cardSpacing;

        for (int i = 0; i <= maxBid; i++)
        {
            GameObject        newButtonObj      = Instantiate(BidButtonPrefab, transform);
            BidButtonBehavior bidButtonBehavior = newButtonObj.GetComponent <BidButtonBehavior>();
            bidButtonBehavior.SetBidValue(i);
            bidButtonBehavior.BidSelectedEvent = new BidSelectedEvent();
            bidButtonBehavior.BidSelectedEvent.AddListener(OnButtonClick);
            newButtonObj.transform.localPosition = new Vector3(firstCardOffset + i * cardSpacing, -3.5f, 0.0f);
        }
        IndianText.enabled = isIndianRound;
        LeaderText.text    = leaderName + " will lead the first trick.";
    }
예제 #2
0
 private void Awake()
 {
     BidSelectedEvent = new BidSelectedEvent();
 }
예제 #3
0
    public void Awake()
    {
        CardSelectedEvent = new CardEvent();

        BidEvent = new BidSelectedEvent();
    }