O'Reilly logo

Make a 2D Arcade Game in a Weekend: With Unity by Jodessiah Sumpter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 4

image

Scripting a Game Manager

In the last chapter we built the basic structure of the game. We have our bricks, paddle, and ball together in the scene and can destroy bricks by launching our ball. The game still needs the logic to keep track of how many bricks were destroyed and the framing of our scene to keep our ball in play.

In this chapter we will work with colliders to frame our scene and limit the area our ball can travel. We will also build a Game Manager object and script to control some of the objects in the game. In addition we add display text so our user knows the current game state.

Let’s make it happen!

Keeping Our Ball in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required