© Casey Hardman  2020
C. HardmanGame Programming with Unity and C#https://doi.org/10.1007/978-1-4842-5656-5_17

17. Walls and Goals

Casey Hardman1 
(1)
West Palm Beach, FL, USA
 

Now that we have some obstacles taking shape and our player movement working nicely, we can start thinking about setting up levels and a win condition for them: touching a goal object.

To block out our levels, we’ll use simple cubes based off a prefab, with variations on their scale and position to stretch them out however we need to make our level. It might look a bit shoddy, but again, we’re programmers, not designers.

Walls

Create a cube and name it Wall. Make a material, also named Wall, apply whatever color you like, and throw it on there. I’m using a brown with a hex value ...

Get Game Programming with Unity and C#: A Complete Beginner’s Guide 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.