コード例 #1
0
        public static void BroadcastFromServer(ushort tileX, ushort tileY)
        {
            if (Main.netMode != NetmodeID.Server)
            {
                throw new ModHelpersException("Not server.");
            }

            var protocol = new SoundEmitterRemoveProtocol(tileX, tileY);

            protocol.SendToClient(-1, -1);
        }
コード例 #2
0
        public static void BroadcastFromClient(ushort tileX, ushort tileY)
        {
            if (Main.netMode != NetmodeID.MultiplayerClient)
            {
                throw new ModHelpersException("Not client.");
            }

            var protocol = new SoundEmitterRemoveProtocol(tileX, tileY);

            protocol.SendToServer(true);
        }