ABSTRACT

This chapter covers how to make classes communicate with one another on a more global scope, and how to control the flow of our data in more comprehensive ways. It covers useful constructs in C#, the array, and all its related forms. Some programming languages like Lua tend to omit many of the tokens used to help show how code statements are encapsulated; some prefer the brevity of the language. For a C-style language, the use of curly braces helps visually separate the statements more clearly. Many different game types use a game controller to move around a character on the screen. The UnityEngine library has within it an EventSystem that is a part of the MonoBehaviour class. That EventSystem then sends messages at appropriate times to every class instance of MonoBehavior to invoke various methods, so long as they are named correctly. Modularity refers to the ability of code to be reused, or shared between objects.