private void OnCardPlotPickup(CardPlot obj) { if (Level.CardsPlotManager.Cards.Count == 0) { button.interactable = false; } }
protected virtual void OnCardClick(CardPlot card) { if (OnClick != null) { OnClick(card); } }
protected virtual void OnCardHighlight(CardPlot card) { CurrentSeletion = card; if (OnHighlight != null) { OnHighlight(card); } }
protected virtual void OnCardUnHighlight(CardPlot card) { if (CurrentSeletion == card) { CurrentSeletion = null; } if (OnUnHighlight != null) { OnUnHighlight(card); } }
public virtual void PickupCard(CardPlot card) { Cards.Remove(card); CardsInventoryManager.Add(CardsManager.GetRandomCard()); if (OnPickup != null) { OnPickup(card); } Destroy(card.gameObject); }
protected virtual void PlacementHighlightAction(CardPlot card) { Placement.gameObject.SetActive(true); card.gameObject.SetActive(false); if (PlacementCardPlot != null) { PlacementCardPlot.gameObject.SetActive(true); } PlacementCardPlot = card; Placement.transform.position = card.transform.position; }
protected virtual void InitCard(CardPlot card) { card.OnClick += () => OnCardClick(card); card.OnHighlight += () => OnCardHighlight(card); card.OnUnHighlight += () => OnCardUnHighlight(card); }