Esempio n. 1
0
    //广播给所有的U3D客户端
    public virtual void Broadcast2AllU3DPlayerActor(Packet packet)
    {
        NetworkModule      module             = (NetworkModule)SingletonMgr.ModuleMgr.GetModule(StringMgr.NetworkModuleName);
        List <PlayerActor> u3dPlayerActorList = module.GetU3DPlayerActors();

        if (u3dPlayerActorList == null)
        {
            return;
        }
        foreach (var playerActor in u3dPlayerActorList)
        {
            playerActor.Agent.SendPacket(packet.Packet2Bytes());
        }
    }