public void OnMouseUp() { if (cardState.Equals(CardState.已翻牌)) { return; } if (gameManager.ReadyToCompareCards) { return; } if (cardState.Equals(CardState.配對成功)) { return; } OpenCard(); gameManager.AddCardInCardComparison(this); gameManager.CompareCardsInList(); }
private void ClickCard() { if (cardState.Equals(CardState.HasOpen)) { return; } if (gameController.ReadyToCompareCards) { return; } OpenCard(); gameController.AddCardInComparison(this); gameController.CampareCardsInList(); }
//滑鼠按下放開後 private void OnMouseUp() { //第一個翻開的牌不會再直接可翻...得選擇另一張不同的牌 if (cardState.Equals(CardState.YetPick)) { return;//後面都不會被執行 } //當已經翻開兩張牌...進行判斷...不給予機會在此期間翻開第三張牌 if (gameManager.ReadyToCompareCards) { return;//後面都不會被執行 } OpenCard();//run OpenCard gameManager.AddCardInCardComparison(this); gameManager.CompareCardsInList(); }