コード例 #1
0
    public void ShowTutorial(string id, Vector3 pos, bool exclusive = false)
    {
        if (GameFlow.IsSomeWindow() && GameFlow.GetCurrentActiveWindowId() != UIConsts.FORM_ID.TUTOR_WINDOW)
        {
            // cant show tutorial (some window is opened)
            // TODO try open after delay? no!
            return;
        }

        // variant for new Tutors
        EventData eventData = new EventData("OnOpenFormNeededEvent");

        eventData.Data["form"]      = UIConsts.FORM_ID.TUTOR_WINDOW;
        eventData.Data["id"]        = id;
        eventData.Data["toqueue"]   = GameManager.Instance.GameFlow.IsSomeWindow();
        eventData.Data["exclusive"] = exclusive;
        eventData.Data["pos"]       = pos;
        GameManager.Instance.EventManager.CallOnOpenFormNeededEvent(eventData);
    }