Beispiel #1
0
 public void StartGame()
 {
     buttonGroup.interactable = false;
     betManager.TakeCurrency();
     ids      = new CardsDealt();
     curIndex = 0;
     foreach (var card in cards)
     {
         card.Hide();
     }
     StartCoroutine(FlipCardsWithDelay());
 }
Beispiel #2
0
    void Awake()
    {
        _drawingCardDeck = FormCardDeck();

        CardsDealt += (sender, args) =>
        {
            Delegate[] handlers = CardsDealt.GetInvocationList();
            handlers.ToList().ForEach(d =>
            {
                CardsDealt -= d as EventHandler;
            });
            CardsDealt += (o, eventArgs) =>
            {
                GameObject.FindGameObjectWithTag("Interface").transform.FindChild("Roll Button").gameObject.SetActive(true);
                SetStatusText("Roll of the dice for Player");
            };
        };
        //_resolver = new DoubleExecutionCompletionEventResolution(() => {});
        SetStatusText("Deal the cards");
    }
Beispiel #3
0
 protected virtual void OnCardsDealt(DealCardEventArgs args)
 {
     CardsDealt?.Invoke(this, args);
 }