예제 #1
0
    void SetOtherPortHuoCheNpcInfo(XKSpawnNpcPoint pointScript, int indexPoint)
    {
        if (Network.peerType != NetworkPeerType.Server)
        {
            return;
        }

        GameObject npcObj = pointScript.GetNpcLoopObj();

        if (pointScript == null || npcObj == null)
        {
            return;
        }

        XKDaPaoCtrl daPaoScript = npcObj.GetComponent <XKDaPaoCtrl>();

        if (daPaoScript != null)
        {
            daPaoScript.SetHuoCheNpcInfo(indexPoint);
        }
        else
        {
            XKNpcMoveCtrl npcScript = npcObj.GetComponent <XKNpcMoveCtrl>();
            if (npcScript != null)
            {
                npcScript.SetHuoCheNpcInfo(indexPoint);
            }
        }
    }