Smooth 3C & simplify hallucination trigger
This commit is contained in:
@@ -39,6 +39,8 @@ namespace Unheimlich.Features.Dialogue
|
||||
public DialogueConversation CurrentConversation => _currentConversation;
|
||||
public DialogueNode CurrentNode => _currentNode;
|
||||
|
||||
private bool _blurEnabled;
|
||||
|
||||
public event Action<DialogueChoiceData> OnChoiceMade;
|
||||
public event Action<object> OnDialogueCompleted;
|
||||
|
||||
@@ -132,11 +134,9 @@ namespace Unheimlich.Features.Dialogue
|
||||
|
||||
IsInDialogue = false;
|
||||
_isWaitingForAutoClose = false;
|
||||
|
||||
if (DialogueBlurEffectURP.Instance != null)
|
||||
{
|
||||
|
||||
if (_blurEnabled && DialogueBlurEffectURP.Instance != null)
|
||||
DialogueBlurEffectURP.Instance.HideBlur();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -154,7 +154,7 @@ namespace Unheimlich.Features.Dialogue
|
||||
}
|
||||
}
|
||||
|
||||
public void StartConversation(DialogueConversation conversation, Transform choiceAnchor = null, DialogueAnimationSettings animationSettings = null, DialogueUI customDialogueUI = null, object owner = null)
|
||||
public void StartConversation(DialogueConversation conversation, Transform choiceAnchor = null, DialogueAnimationSettings animationSettings = null, DialogueUI customDialogueUI = null, object owner = null, bool showBlur = false)
|
||||
{
|
||||
if (conversation == null)
|
||||
{
|
||||
@@ -175,6 +175,7 @@ namespace Unheimlich.Features.Dialogue
|
||||
_currentAnimationSettings = animationSettings;
|
||||
_activeDialogueUI = customDialogueUI;
|
||||
CurrentOwner = owner;
|
||||
_blurEnabled = showBlur;
|
||||
|
||||
if (_activeDialogueUI == null)
|
||||
{
|
||||
@@ -182,6 +183,10 @@ namespace Unheimlich.Features.Dialogue
|
||||
return;
|
||||
}
|
||||
|
||||
if (_blurEnabled && DialogueBlurEffectURP.Instance != null)
|
||||
DialogueBlurEffectURP.Instance.ShowBlur();
|
||||
|
||||
PlayerEvents.TriggerEnterDialogue();
|
||||
ShowCurrentNode();
|
||||
}
|
||||
|
||||
@@ -259,13 +264,14 @@ namespace Unheimlich.Features.Dialogue
|
||||
public void EndDialogue()
|
||||
{
|
||||
IsInDialogue = false;
|
||||
|
||||
|
||||
if (_activeDialogueUI != null)
|
||||
_activeDialogueUI.HideDialogueBox();
|
||||
|
||||
if (DialogueBlurEffectURP.Instance != null)
|
||||
|
||||
if (_blurEnabled && DialogueBlurEffectURP.Instance != null)
|
||||
DialogueBlurEffectURP.Instance.HideBlur();
|
||||
|
||||
|
||||
PlayerEvents.TriggerExitDialogue();
|
||||
CleanupDialogue();
|
||||
}
|
||||
|
||||
@@ -275,7 +281,8 @@ namespace Unheimlich.Features.Dialogue
|
||||
_currentAnimationSettings = null;
|
||||
_activeDialogueUI = null;
|
||||
CurrentOwner = null;
|
||||
|
||||
_blurEnabled = false;
|
||||
|
||||
_currentConversation = null;
|
||||
_currentNode = null;
|
||||
_autoCloseTimer = 0f;
|
||||
|
||||
Reference in New Issue
Block a user