public void RegisterActiveInteraction(Interaction.Type interactionType) { activeInteractionType = interactionType; HideActionAvailablePrompt(); playerController.Disable(); SystemManager.Instance.RegisterActiveSystem(GameSystem.Type.Interaction); }
public void UnregisterActiveInteraction() { ShowActionAvailablePrompt(); playerController.Enable(); SystemManager.Instance.UnregisterActiveSystem(GameSystem.Type.Interaction); activeInteractionType = Interaction.Type.None; }
/// <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(); }