This was a lot to take in, I know. So, let's review some of the main points of OOP as we approach the finish line:
- OOP is all about grouping related data and actions into objects—objects that can communicate and act independently from each other.
- Access to class members can be set using access modifiers, just like variables.
- Classes can inherit from other classes, creating trickle-down hierarchies of parent/child relationships.
- Classes can have members of other class or struct types.
- Classes can override any parent methods marked as virtual, allowing them to perform custom actions while retaining the same blueprint.
OOP is not the only programming paradigm that can be used with C#—you can find practical explanations of the other main approaches here: http://cs.lmu.edu/~ray/notes/paradigms.
All the OOP you've learned in this chapter is directly applicable to the C# world. However, we still need to put this into perspective with Unity, which is...