void CheckAutoFireCom()
    {
        GameObject npcObj = SpawnPoint.GetNpcLoopObj();

        if (npcObj == null)
        {
            return;
        }

        XKNpcMoveCtrl npcScript = npcObj.GetComponent <XKNpcMoveCtrl>();

        if (npcScript != null)
        {
            npcScript.SetFireDistance(0);
        }

        XKNpcSpawnAmmoCtrl npcSpawnAmmo = npcObj.GetComponent <XKNpcSpawnAmmoCtrl>();

        if (npcSpawnAmmo != null)
        {
            npcSpawnAmmo.StartSpawnNpcAmmo(DaoDanNum);
        }

        if (TimeFirePT > 0)
        {
            Invoke("CloseDuiYouFirePTAmmo", TimeFirePT);
        }
    }
    //关闭队友npc
    void CloseDuiYouFirePTAmmo()
    {
        //Debug.Log("CloseDuiYouFirePTAmmo...");
        GameObject npcObj = SpawnPoint.GetNpcLoopObj();

        if (npcObj == null)
        {
            return;
        }

        XKNpcMoveCtrl npcScript = npcObj.GetComponent <XKNpcMoveCtrl>();

        if (npcScript != null)
        {
            npcScript.SetFireDistance(-1);
        }
    }
    void CheckAutoFireCom()
    {
        if (AutoFireCom.Length > 0)
        {
            int max = AutoFireCom.Length;
            for (int i = 0; i < max; i++)
            {
                if (AutoFireCom[i] != null)
                {
                    AutoFireCom[i].StartAutoFire();
                }
            }
        }

        if (AutoFireNpc.Length > 0)
        {
            XKNpcMoveCtrl  npcScript = null;
            XKCannonCtrl[] cannonScript;
            float          fireDisVal = 99999f;
            int            max        = AutoFireNpc.Length;
            for (int i = 0; i < max; i++)
            {
                if (AutoFireNpc[i] != null)
                {
                    npcScript = AutoFireNpc[i].GetComponent <XKNpcMoveCtrl>();
                    if (npcScript != null)
                    {
                        npcScript.SetFireDistance(fireDisVal);
                    }

                    cannonScript = AutoFireNpc[i].GetComponentsInChildren <XKCannonCtrl>();
                    if (cannonScript != null && cannonScript.Length > 0)
                    {
                        int maxCannon = cannonScript.Length;
                        for (int j = 0; j < maxCannon; j++)
                        {
                            cannonScript[j].FireDis = fireDisVal;
                        }
                    }
                }
            }
        }
    }