Esempio n. 1
0
    //--------------------------------------
    // Public methods
    //--------------------------------------


    public void ShowInAppPopup(string title, string describtion, string price, Action <bool> OnComplete = null)
    {
        if (_CurrentTween != null)
        {
            _CurrentTween.Stop();
        }

        if (_FaderTween != null)
        {
            _FaderTween.Stop();
        }


        _OnComplete = OnComplete;

        Title.text       = title;
        Describtion.text = describtion;
        Price.text       = price;



        Animate(150, -300f, SA.Common.Animation.EaseType.easeOutBack);
        _CurrentTween.OnComplete += HandleOnInTweenComplete;

        FadeIn();
    }
Esempio n. 2
0
    public void ShowNotification(string title, string message, SA_EditorNotificationType type)
    {
        if (_CurrentTween != null)
        {
            _CurrentTween.Stop();
        }
        CancelInvoke("NotificationDelayComplete");


        Title.text   = title;
        Message.text = message;


        foreach (Image icon in Icons)
        {
            icon.gameObject.SetActive(false);
        }

        switch (type)
        {
        case SA_EditorNotificationType.Achievement:
            Icons[0].gameObject.SetActive(true);
            break;

        case SA_EditorNotificationType.Error:
            Icons[1].gameObject.SetActive(true);
            break;

        case SA_EditorNotificationType.Leaderboards:
            Icons[2].gameObject.SetActive(true);
            break;

        case SA_EditorNotificationType.Message:
            Icons[3].gameObject.SetActive(true);
            break;
        }

        Animate(52f, -52f, SA.Common.Animation.EaseType.easeOutBack);
        _CurrentTween.OnComplete += HandleOnInTweenComplete;
    }