Exemplo n.º 1
0
    public override bool UnRegisterObject(GameObject toUnRegister, IInteractionLogic id)
    {
        IUIData script = GetDesiredUIScript(toUnRegister, UIViewType.Dialog);

        if (script != null && script.UIType == UIViewType.Dialog)
        {
            IDialogData data = (IDialogData)script;
            data.EnableComponent(false);
            data.SetTitle(string.Empty);
            data.SetFormattedString(string.Empty);
        }
        return(base.UnRegisterObject(toUnRegister, id));
    }
Exemplo n.º 2
0
    public override bool RegisterObject(GameObject toRegister, IInteractionLogic id)
    {
        bool wasSuccessFullRegister = base.RegisterObject(toRegister, id);

        if (wasSuccessFullRegister)
        {
            IUIData script = GetDesiredUIScript(toRegister, UIViewType.Dialog);
            if (script != null && script is IDialogData)
            {
                IDialogData data = (IDialogData)script;
                data.EnableComponent(true);
                data.SetTitle(this.Title);
                data.SetFormattedString(this.GetFormattedBulletPoints());
            }
        }
        return(wasSuccessFullRegister);
    }