Example #1
0
    private void ShowTutorialInfo(TutorialTrigger t)
    {
        if (t == null)
        {
            return;
        }

        if (lastTutorialTrigger != null)
        {
            if (lastTutorialTrigger.destroyOnShowed)
            {
                Destroy(lastTutorialTrigger);
            }
            lastTutorialTrigger = null;
        }

        PopUpData info = t.info;

        if (t.highlightObject)
        {
            popUpManager.Show(info, t.GetRect());
        }
        else
        {
            popUpManager.Show(info);
        }
        if (TemaryManager.Instance != null)
        {
            TemaryManager.Instance.AddTemary(t.info);
        }

        if (t.OnShowed != null)
        {
            t.OnShowed.Invoke();
        }

        if (!triggered.Contains(t.GetHash()))
        {
            triggered.Add(t.GetHash());
        }

        if (!saved.Contains(t.GetHash()))
        {
            savePending.Add(t);
        }

        if (t.isSaveCheckpoint)
        {
            SavePendingTriggers();
        }

        lastTutorialTrigger = t;

        /*if (t.destroyOnShowed)
         *  Destroy(t);*/
    }
 public void ShowDefault() => PopUpManager.Show(message);
 public void ShowOverride() => PopUpManager.Show(overridePopUp.gameObject, message);
 public virtual void Show(T config) => PopUpManager.Show((Prefab == null)?null:Prefab, config);