Scripting our non-player characters

In this section, we will write the necessary scripts to manage the Cucumber Beetles in our game. Specifically, we will write scripts to accomplish the following:

  • Beetle patrol
  • Beetle finds and eats cucumber
  • Beetle attacks player on the ground
  • Beetle stands to attack

Get Getting Started with Unity 2018 - Third 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.