public void Validation() { CardBehavior firstCard = Context.GetInstance().firstInstance; CardBehavior secondCard = Context.GetInstance().secondInstance; if (firstCard.GetCurrentSprite().name == secondCard.GetCurrentSprite().name) { Context.GetInstance().firstInstance.Dispose(); Context.GetInstance().secondInstance.Dispose(); Context.GetInstance().currentState = Context.GetInstance().NoCards; Context.GetInstance().firstInstance = null; Context.GetInstance().secondInstance = null; } else { firstCard.PlayAnimation(); secondCard.PlayAnimation(); } }