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); }
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); }
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); }