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) { 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.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)); }
public virtual bool RegisterObject(GameObject toRegister, IInteractionLogic id) { if (!storedObjects.ContainsValue(toRegister)) { id.InputChangedWithId += Id_InputChangedWithId; storedObjects.Add(id.InteractionID, toRegister); if (OnRegister != null) { OnRegister(id); } return(true); } return(false); }
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); }
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); }
public virtual bool UnRegisterObject(GameObject toUnRegister, IInteractionLogic id) { GameObject value; if (storedObjects.ContainsValue(toUnRegister) && storedObjects.TryGetValue(id.InteractionID, out value) && value == toUnRegister) { id.InputChangedWithId -= Id_InputChangedWithId; storedObjects.Remove(id.InteractionID); if (OnUnRegister != null) { OnUnRegister(id); } return(true); } return(false); }
public InteractionController(IInteractionLogic interactionLogic) { _interactionLogic = interactionLogic; }
// Use this for initialization void Start() { interactebleInput = new InteractableInput(); interactionLogic = new InteractionLogic(ref interactebleInput, this.gameObject.GetInstanceID()); }