Click or drag to resize

Send2DTexture_Example Methods

The Send2DTexture_Example type exposes the following members.

Methods
  NameDescription
Public methodStatic memberChangeSpriteTexture
The function is called after the Texture2D is sent by all users. Note: All users must have this function defined for them (just like with other callback functions except claim). Just because other users do not have the Texture2D being sent does not mean they do not need this function. This function can be used to do whatever you want to do after the Texture2D has been transferred. In this case, it is simply swapping the Texture2D out on the current sprite, changing the image the sprite displays. This function can be named anything, but must be a static public void function.
Public methodSendAndChangeTexture
An example of how to send a Texture2D. Optional parameters include to send it as a PNG (larger file, but allows for transparent pixels, default is JPG), and to synchronize every user's callback function (in this case, "ChangeSPriteTexture"), the default is to not synchronize callback functions, so once a user downloads an image, by default they will execute their given function instead of waiting for every other user to download the image as well.
Private methodStart
Start function is used to set up the button listener
Top
See Also