浏览代码

Fixed issue of all townsfolk listening to protagonist

/main
Amel Negra 4 年前
当前提交
b3067c77
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 9
      UOP1_Project/Assets/Scripts/Quests/StepController.cs

9
UOP1_Project/Assets/Scripts/Quests/StepController.cs


private void Start()
{
_winDialogueEvent.OnEventRaised += PlayWinDialogue;
_loseDialogueEvent.OnEventRaised += PlayLoseDialogue;
}
void PlayDefaultDialogue()

_startDialogueEvent.RaiseEvent(_currentDialogue);
_endDialogueEvent.OnEventRaised += EndDialogue;
StopTalkingToCurrentActor();
_winDialogueEvent.OnEventRaised += PlayWinDialogue;
_loseDialogueEvent.OnEventRaised += PlayLoseDialogue;
_winDialogueEvent.OnEventRaised -= PlayWinDialogue;
_loseDialogueEvent.OnEventRaised -= PlayLoseDialogue;
ResumeTalkingToCurrentActor();
isInDialogue = false;
}

private void StopTalkingToCurrentActor()
{
GameObject[] talkingTo = gameObject.GetComponent<NPC>().talkingTo;
if(talkingTo != null)
if (talkingTo != null)
{
for (int i = 0; i < talkingTo.Length; ++i)
{

正在加载...
取消
保存