44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class NPCController : PermanentTriggerBase
|
|
{
|
|
public List<string> npcSpeack;
|
|
public int speackIndex = 0;
|
|
protected override void OnMDown()
|
|
{
|
|
base.OnMDown();
|
|
|
|
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, false ) == 0)
|
|
{
|
|
GameManager.UIMgr.ShowPanel<UI_CustomSessionPanel>(E_UI_Layer.Mid, (panel) =>
|
|
{
|
|
panel.Init(triggerName, npcSpeack[speackIndex], NextSpeack);
|
|
});
|
|
_highlight.SetHighlighted(false);
|
|
}
|
|
}
|
|
|
|
private void NextSpeack(string id)
|
|
{
|
|
speackIndex++;
|
|
if (speackIndex <= npcSpeack.Count - 1)
|
|
{
|
|
if (GameManager.UIMgr.GetPanel<UI_CustomSessionPanel>())
|
|
{
|
|
GameManager.UIMgr.GetPanel<UI_CustomSessionPanel>().Init("", npcSpeack[speackIndex], NextSpeack);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, true);
|
|
//̸»°»Øµ÷
|
|
ScoreManager.instance.Check(triggerName, null);
|
|
if (GameManager.UIMgr.GetPanel<UI_CustomSessionPanel>())
|
|
GameManager.UIMgr.HidePanel<UI_CustomSessionPanel>();
|
|
speackIndex = 0;
|
|
}
|
|
}
|
|
}
|