CHAPTER 27

OBJECT-ORIENTED THINKING

This chapter covers how to think in terms of object-oriented programming (OOP), the logical extension of the classes discussed in the preceding chapter.

By the end of this chapter, you'll understand not only how to think in terms of OOP but also how to specifically structure projects in the manner that is best for the Unity development environment.

The Object-Oriented Metaphor

The easiest way to describe object orientation is through a metaphor. Think about all the birds in a flock. Flocks can consist of hundreds or even thousands of individual birds, each of which must avoid obstacles and other birds while still moving along with the flock. Flocks of birds exhibit brilliantly coordinated behaviors that for ...

Get Introduction to Game Design, Prototyping, and Development: From Concept to Playable Game with Unity and C#, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.