private void StartSecondarySelect() { ActiveCard.ToggleSelect(true); SecondSelect = true; Selection.Clear(); TestActionConditions(); CycleButton.interactable = false; CancelButton.interactable = true; }
public void StartPlacedAction(PlayingCard PlacedCard) { if (PlacedCard.GetEntity().PAHolder.GetAction().Max == 0) { SendAction(new ActionOrder(PlacedCard.GetEntity().PAHolder.GetAction().mAction, PlacedCard.GetEntity(), new List <Entities.Entity>())); ResetActions(); ResetSelections(); UpdateUI(); } else { ResetActions(); ResetSelections(); PlacedCard.ToggleSelect(false); ActiveCard = PlacedCard; CurrentPossibleActions = new List <ActionInfo>(); CurrentPossibleActions.Add(PlacedCard.GetEntity().PAHolder.GetAction()); CurrentActionIndex = 0; ActionButton.GetComponentInChildren <Text>().text = CurrentPossibleActions[CurrentActionIndex].ActionName; StartSecondarySelect(); } }
public void CardSelected(PlayingCard SelectedCard) { if (((PlayingCard)SelectedCard).IsPlaced() || TheTurnInformation.IsMulligan) { if (SecondSelect) { if (CurrentPossibleActions[CurrentActionIndex].SelectType == PlayerType.Ally && SelectedCard.GetEntity().GetOwnerIndex() != TheTurnInformation.GetCPI()) { return; } if (CurrentPossibleActions[CurrentActionIndex].SelectType == PlayerType.Enemy && SelectedCard.GetEntity().GetOwnerIndex() == TheTurnInformation.GetCPI()) { return; } if (SelectedCard == ActiveCard) { return; } if (SelectedCard.ToggleSelect(false)) { Selection.Add(SelectedCard); } else { Selection.Remove(SelectedCard); } TestActionConditions(); return; } if (SelectedCard.GetEntity().GetOwnerIndex() == TheTurnInformation.GetCPI()) { if (SelectedCard.ToggleSelect(false)) { Selection.Add(SelectedCard); } else { Selection.Remove(SelectedCard); } if (Selection.Count == 1) { if (TheTurnInformation.IsMulligan) { ActiveCard = Selection[0]; CurrentPossibleActions = mMulliganAction; CurrentActionIndex = 0; ActionButton.GetComponentInChildren <Text>().text = "Mulligan"; TestActionConditions(); } else { SetActive(Selection[0]); } } else { ResetActions(); } } } }