protected virtual void OnDisappeared(CardEventArgs e) { var handler = this.Disappeared; if (handler != null) { handler(this, e); } }
protected virtual void OnReturned(CardEventArgs e) { var handler = this.Returned; if (handler != null) { handler(this, e); } }
private void CardControllerTapped(object sender, CardEventArgs e) { CardController card = e.Card; openedCards.Add(e.Card); card.Turn(); card.Model.Opened = true; LockInteraction(); }
private void CardControllerTurned(object sender, CardEventArgs e) { if (openedCards.Count < 2) { UnlockInteraction(); return; } delayedAction = delayedActionPool.Spawn( () => CompareCards(openedCards [0], openedCards [1]), 1f); }
private void CardControllerDisappeared(object sender, CardEventArgs e) { e.Card.Returned -= CardControllerDisappeared; UnlockInteraction(); }