Example #1
0
    /// <summary>
    /// 界面显示之前调用
    /// </summary>
    protected override void OnStart(INotification notification)
    {
        if (promptMediator == null)
        {
            promptMediator = Facade.RetrieveMediator("PromptMediator") as PromptMediator;
        }
        PromtInfo info = notification.Body as PromtInfo;

        copyTeam           = info.copyTeam;
        createTeam         = info.createTeam;
        confirm            = info.confirm;
        panel.context.text = info.context;
        panel.title.text   = info.title;
        if (info.promtType == PromtType.CreateTeam)
        {
            panel.normal.gameObject.SetActive(false);
            panel.createTeam.gameObject.SetActive(true);
            panel.cancelBtn.transform.localPosition = new Vector3(0, -149, 0);
        }
        else if (info.promtType == PromtType.Normal)
        {
            panel.normal.gameObject.SetActive(true);
            panel.createTeam.gameObject.SetActive(false);
        }
    }
Example #2
0
    public static void ShowPromptPanel(string title, string context, PromtType type, Confirm confirm = null, CreateTeam createTeam = null, CopyTeam copyTeam = null)
    {
        PromtInfo info = new PromtInfo();

        info.title      = title;
        info.context    = context;
        info.promtType  = type;
        info.confirm    = confirm;
        info.createTeam = createTeam;
        info.copyTeam   = copyTeam;
        info.promtType  = type;
        Facade.Instance.SendNotification(NotificationID.PromptOpen, info);
    }