Beispiel #1
0
    public void ShowText(PopupTextType _textType)
    {
        var temp = popupTexts.Find(someText => someText.popupTextType == _textType);

        if (temp != null)
        {
            CurrentPopupText = temp;
            NewPopuTextAction?.Invoke();
        }
    }
Beispiel #2
0
    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();
    }