示例#1
0
        public void TextureChannelUnsubscribe(string channel, TextureChannelDelegate handler)
        {
            //Debug.Log("Bridge: TextureChannelUnsubscribe: channel: " + channel + " handler: " + handler + " exists: " + textureChannels.ContainsKey(channel));

            if (!textureChannels.ContainsKey(channel))
            {
                return;
            }

            textureChannels[channel] -= handler;
        }
示例#2
0
        ////////////////////////////////////////////////////////////////////////
        // Texture channels.


        public void DistributeTexture(string channel, Texture2D texture, object data)
        {
            if (!textureChannels.ContainsKey(channel))
            {
                //Debug.Log("Bridge: SendTexture: not sending to dead channel: " + channel + " texture: " + texture + " data: " + data);
                return;
            }

            TextureChannelDelegate handler = textureChannels[channel];

            //Debug.Log("Bridge: SendTexture: sending to live channel: " + channel + " texture: " + texture + " data: " + data + " handler: " + handler);

            handler(texture, channel, data);
        }