/// <summary> /// Events that occurs when a card is added to pot /// when there are 4 cards in the pot it starts the animation /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Pot_PotAdd(object sender, PileEventArgs e) { gameData.WastePile.AddCard(e.card); // add the played card to waste pile too if (gameData.CurrentPot.CardPile.Count == 4) { lock (this) { IsAnimating = true; animationCounter = 40; this.animationTimer.Start(); } } }
public virtual void OnPotAdd(PileEventArgs e) { if (PotAdd != null) PotAdd(this, e); }