1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| using UnityEngine;
|
| public class AreaTrigger : MonoBehaviour
| {
| private SoMap.AreaTrigger data;
|
| private void OnTriggerEnter(Collider other)
| {
| if (data == null)
| {
| Destroy(gameObject);
| return;
| }
|
| for (int i = 0; i < data.refreshNPCList.Count; ++i)
| {
| PreFightMission.Instance.GeneralRefreshNpc(SoMap.E_TriggerType.Area, data.id, data.refreshNPCList[i]);
| }
|
| for (int i = 0; i < data.createImpasseList.Count; ++i)
| {
| PreFightMission.Instance.GeneralCreateImpasse(SoMap.E_TriggerType.Mission, data.id, data.createImpasseList[i]);
| }
|
| data = null;
| Destroy(gameObject);
| }
| }
|
|