29 lines
734 B
C#
29 lines
734 B
C#
/*
|
|
* Author: Lin Hengrui Ryan, Livinia Poo
|
|
* Date: 15/2/25
|
|
* Description:
|
|
* Calling and assigning new npc
|
|
*/
|
|
|
|
using UnityEngine;
|
|
|
|
public class NextButton : MonoBehaviour
|
|
{
|
|
/// <summary>
|
|
/// Next NPC to desk based on scene list
|
|
/// </summary>
|
|
public void CallNext()
|
|
{
|
|
if(GameManager.instance.currentNPC == null)
|
|
{
|
|
var npcs = NpcManager.instance.currentNpcs;
|
|
var randomnpc = npcs[Random.Range(0, npcs.Count)];
|
|
|
|
GameManager.instance.SetCurrentNPC(randomnpc);
|
|
randomnpc.GetComponent<NpcMovementRework>().CustomerCalled();
|
|
|
|
PlayerDialogueInteraction.instance.ResetChecklist();
|
|
PlayerDialogueInteraction.instance.ResetDialogue();
|
|
}
|
|
}
|
|
}
|