This lesson is only available with a subscription.
Lesson 27. Using a Switch statement to run code based on the enemy state
To run code based on the current state we use a Switch Case statement and fill in some logging code.
Software used
Unity 3.4
What you will learn
In this series of Unity tutorials, we'll demonstrate how to setup our waypoints in order to allow our enemies to seek and destroy the player. We'll also discuss how to create a basic AI for our enemies. Having a computer understand our level is one of the most pertinent problems facing any game developer. Waypoints are a quick and powerful way to create a simple model of a level that an AI can understand. Once we have our waypoints set-up and working, we'll create an enemy AI that can find and attack the player.
Tutor
Chris Glick

44 Lessons

57 likes / 18,833 views