In this case, we will add an event when the user selects one of the pieces from the Palette. To achieve this, we we will add the following lines of code to the
public delegate void itemSelectedDelegate (PaletteItem item,Texture2D preview); public static event itemSelectedDelegate ItemSelectedEvent;
delegate type defines the signature for the method that handles the event. In this case,
itemSelectedDelegate receives a PaletteItem and a Texture2D with the preview.
Now, it is time to invoke the event. We will do this inside the...