using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; public class NPCTrigger : MonoBehaviour { public List open; public List close; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } public void Open() { foreach (var obj in open) { obj.SetActive(true); } foreach (var obj in close) { obj.SetActive(false); } } public void Close() { foreach (var obj in open) { obj.SetActive(false); } foreach (var obj in close) { obj.SetActive(true); } } public void OnNPCEventEnter() { GameSystem.ins.SaveNPCbo(true); } public void OnNPCEventExit() { GameSystem.ins.SaveNPCbo(false); } }