public void ShowText(PopupTextType _textType) { var temp = popupTexts.Find(someText => someText.popupTextType == _textType); if (temp != null) { CurrentPopupText = temp; NewPopuTextAction?.Invoke(); } }
public void CreateText(Vector2 position, string text, PopupTextType type, bool crit, PopupTextDirection direction) { PopupText popupText = Instantiate(popupTextPrefab, popupTextTransform); popupText.transform.position = position; popupText.Text = text; popupText.Type = type; popupText.Crit = crit; popupText.Direction = direction; popupText.Move(); }