/// <summary> /// If the interaction that was listening for input was suspended, this will restart listening for input. /// </summary> public void RestablishInteraction() { if (currentTrigger != null) { currentTrigger.EnableInteraction(); } }
/// <summary> /// Registers trigger as ready for interaction. Will override the current active trigger, if any. /// the current one. /// </summary> /// <param name="trigger">Trigger to be marked as ready for interaction with the player</param> /// <param name="interactionType">Type of interaction the current trigger allows</param> public void RegisterTrigger(IInteractionTrigger trigger, Interaction.Type interactionType) { if (currentTrigger != null) { currentTrigger.DisableInteraction(); } currentTrigger = trigger; currentTrigger.EnableInteraction(); ShowActionAvailablePrompt(); }