public void AddTestTriggerSpawnNpc(XKTriggerSpawnNpc script)
    {
        bool isFind = TestTriggerSpawnNpc.Contains(script);

        if (isFind)
        {
            return;
        }
        TestTriggerSpawnNpc.Add(script);
    }
    public bool AddTriggerSpawnScript(XKTriggerSpawnNpc script)
    {
        if (SpawnPointCheckList == null)
        {
            SpawnPointCheckList = new List <XKSpawnNpcPointCheck>();
            for (int i = 0; i < 10; i++)
            {
                SpawnPointCheckList.Add(new XKSpawnNpcPointCheck());
            }
        }

        bool isWrong = false;

        for (int i = 0; i < SpawnPointCheckList.Count; i++)
        {
            if (SpawnPointCheckList[i] != null)
            {
                if (SpawnPointCheckList[i].TriggerSpawnScript == null)
                {
                    SpawnPointCheckList[i].TriggerSpawnScript = script;
                    SpawnPointCheckList[i].Count++;
                    if (SpawnPointCheckList[i].Count > 1)
                    {
                        isWrong = true;
                    }
                    break;
                }
                else
                {
                    if (SpawnPointCheckList[i].TriggerSpawnScript == script)
                    {
                        SpawnPointCheckList[i].Count++;
                        if (SpawnPointCheckList[i].Count > 1)
                        {
                            isWrong = true;
                        }
                        break;
                    }
                }
            }
        }
        return(isWrong);
    }