In this section, we will create an event that will be triggered every time you select a piece in the Palette and captured by the Level inspector. This feature will be used in the next chapter.
An event in C# is a way for a class to provide notifications when something happens to an object.
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 ...