|
|
|
|
|
|
[Header("Broadcasting on channels")] |
|
|
|
//[SerializeField]
|
|
|
|
public DialogueDataChannelSO _startDialogueEvent = default; |
|
|
|
|
|
|
|
|
|
|
|
[Header("Dialogue Shot Camera")] |
|
|
|
public GameObject dialogueShot; |
|
|
|
|
|
|
|
//check if character is actif. An actif character is the character concerned by the step.
|
|
|
|
private DialogueDataSO _currentDialogue; |
|
|
|
|
|
|
private void Start() |
|
|
|
{ |
|
|
|
|
|
|
|
if (dialogueShot) dialogueShot.SetActive(false); |
|
|
|
} |
|
|
|
|
|
|
|
void PlayDefaultDialogue() |
|
|
|
|
|
|
_winDialogueEvent.OnEventRaised += PlayWinDialogue; |
|
|
|
_loseDialogueEvent.OnEventRaised += PlayLoseDialogue; |
|
|
|
isInDialogue = true; |
|
|
|
if (dialogueShot) dialogueShot.SetActive(true); |
|
|
|
} |
|
|
|
void EndDialogue() |
|
|
|
{ |
|
|
|
|
|
|
ResumeConversation(); |
|
|
|
isInDialogue = false; |
|
|
|
if (dialogueShot) dialogueShot.SetActive(false); |
|
|
|
} |
|
|
|
|
|
|
|
void PlayLoseDialogue() |
|
|
|