public void OnClick_ChoiceCard(int ChoiceIndex) { assert.set(ChoiceIndex < 4); assert.set(ChoiceIndex >= 0); switch (CurStep) { case eCHOICE_STEP.None: { CurStep = eCHOICE_STEP.ThrowSelect; ThrowSelectIndex = ChoiceIndex; Card_Base cardClass = CardList[ChoiceIndex]; cardClass.SetCardView(PlayTypes.CardView.Back); cardClass.SetEnableSelectBtn(false); cardClass.ToTrump().SetEnableBackBtn(true); ThrowText.SetActive(false); OpenText.SetActive(true); } break; case eCHOICE_STEP.ThrowSelect: { if (ThrowSelectIndex == ChoiceIndex) { Card_Base cardClass = CardList[ChoiceIndex]; cardClass.SetCardView(PlayTypes.CardView.Front); cardClass.SetEnableSelectBtn(true); cardClass.ToTrump().SetEnableBackBtn(false); ThrowText.SetActive(true); OpenText.SetActive(false); CurStep = eCHOICE_STEP.None; ThrowSelectIndex = -1; } else { CurStep = eCHOICE_STEP.ViewSelect; ViewSelectIndex = ChoiceIndex; // 버리고 나서의 선택카드 인덱싱 - 서버 전달 헷갈리지 말자 if (ViewSelectIndex > ThrowSelectIndex) { --ViewSelectIndex; } GameSingleton.GetPlay().ToSevenPoker().Send_ChoiceComplete(ThrowSelectIndex, ViewSelectIndex); } } break; } }
// =========================================================================== // // Card // // =========================================================================== override public void AddCardClass(Card_Base cardClas) { base.AddCardClass(cardClas); if (GetPlayer().ToSevenPoker().IsMyPlayer() == true) { switch (CurStep) { case PlayTypes.SevenPokerStep.Begin: { cardClas.SetCardView(PlayTypes.CardView.Front); } break; } } }