Example #1
0
    public override bool RegisterObject(GameObject toRegister, IInteractionLogic id)
    {
        IUIData script = GetDesiredUIScript(toRegister, UIViewType.Objective);

        if (script != null)
        {
            script.EnableComponent(true);
            script.SetUIMessage(this.ObjectiveMessage);
        }
        return(true);
    }
Example #2
0
    public override bool UnRegisterObject(GameObject toUnRegister, IInteractionLogic id)
    {
        IUIData script = GetDesiredUIScript(toUnRegister, UIViewType.Objective);

        if (script != null && script.UIType == UIViewType.Objective)
        {
            script.EnableComponent(false);
            script.SetUIMessage(string.Empty);
        }
        return(true);
    }
Example #3
0
    public override bool RegisterObject(GameObject toRegister, IInteractionLogic id)
    {
        bool wasSuccessFullRegister = base.RegisterObject(toRegister, id);

        if (wasSuccessFullRegister)
        {
            IUIData script = GetDesiredUIScript(toRegister, UIViewType.Supply);
            if (script != null)
            {
                script.EnableComponent(true);
                script.SetUIMessage(this.UIMessage);
            }
        }
        return(wasSuccessFullRegister);
    }