public void ShowNextCard() { _curCard = Instantiate(_cardPrefab, transform); _curCard.transform.localPosition = Vector3.zero; _curCard.ConfigData = GetNextCard(); Debug.Log("ShowNextCard " + _curCard.ConfigData.Id); CardEvent.Send(CardResolvePhase.Prepare, CardResult.Yes, _curCard.ConfigData); }
public void ShowMsgCard(string msg, CardConfigData configData = null) { _curCard = Instantiate(_msgCardPrefab, transform); _curCard.transform.localPosition = Vector3.zero; _curCard.ConfigData = configData ?? new CardConfigData(); _curCard.ShowMsg(msg); CardEvent.Send(CardResolvePhase.Prepare, CardResult.Yes, _curCard.ConfigData); }
private void DestroyCurCard() { if (_curCard != null) { Destroy(_curCard.gameObject); _curCard = null; } }