fixed issues with triggers at witch house

This commit is contained in:
2025-10-27 16:04:33 +01:00
parent d7ac70768f
commit 4d0231ed09
6 changed files with 1145 additions and 1027 deletions

View File

@@ -25,8 +25,6 @@ namespace Beyond
public bool disableHUD = true;
[vHelpBox("Changes interaction image")]
//public bool isDialogueTrigger = false;
public TriggerDescriptor.TriggerType triggerType = TriggerDescriptor.TriggerType.Generic;
public UnityEvent OnPlayerMatchTargetPosition;
@@ -130,6 +128,11 @@ namespace Beyond
private void OnActionEndAnimation(GameObject gameObject)
{
// THIS SECTION WAS THE PRIMARY CAUSE OF THE DOUBLE-EXIT CALL.
// The logic below was removed because the trigger exit should only happen
// when the player physically leaves the collider, which is already
// handled by the OnInvalidate event that calls OnActionTriggerExit.
/*
if (disableHUD)
{
ActionTriggerEvent.ActionTriggerExit?.Invoke(m_triggerDescriptor);
@@ -139,6 +142,7 @@ namespace Beyond
{
Player.Instance.ResetIntaractableButtonImage();
}
*/
if (!m_enableInteractionLegality)
{
@@ -165,12 +169,10 @@ namespace Beyond
{
m_faded = true;
FadeCanvasGroup.Instance.FadeOut(1f / m_fadeSpeed);
//.InvokeFade(m_fadeInCurve, m_fadeSpeed);
return;
}
FadeCanvasGroup.Instance.FadeIn(1f / m_fadeSpeed);
//FadeCanvasGroup.InvokeFade(m_fadeOutCurve, m_fadeSpeed);
}
private void OnFadeInEnd()