O'Reilly logo

Unity 5.x Game Development Blueprints by John P. Doran

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

Challenges

For those of you who want to do more with this project, there are still plenty of things you can do, especially after finishing the rest of this book. Here are some ideas to get you thinking:

  • Right now, the enemy will continue following you even if you're through a tree or a wall. Use the Raycast function we talked about in Chapter 3, Side-Scrolling Platformer, to check a line from the player when the enemy collides with something. If it does, then set the enemy's state to Idle.
  • Add sound effects to the ghost character so that the player knows when they are coming closer to the player and add some tension to the game. Adding in other sound effects, such as those for taking a picture and walking around, can help create ambience as well. ...

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