コード例 #1
0
        protected virtual void OnDisappeared(CardEventArgs e)
        {
            var handler = this.Disappeared;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #2
0
        protected virtual void OnReturned(CardEventArgs e)
        {
            var handler = this.Returned;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #3
0
        private void CardControllerTapped(object sender, CardEventArgs e)
        {
            CardController card = e.Card;

            openedCards.Add(e.Card);

            card.Turn();
            card.Model.Opened = true;
            LockInteraction();
        }
コード例 #4
0
        private void CardControllerTurned(object sender, CardEventArgs e)
        {
            if (openedCards.Count < 2)
            {
                UnlockInteraction();
                return;
            }

            delayedAction = delayedActionPool.Spawn(
                () => CompareCards(openedCards [0], openedCards [1]),
                1f);
        }
コード例 #5
0
 private void CardControllerDisappeared(object sender, CardEventArgs e)
 {
     e.Card.Returned -= CardControllerDisappeared;
     UnlockInteraction();
 }