Checking for monsters
Great, now that we understand how to determine distance and how GPS accuracy can alter trilateration of location, it is time to start tracking the monsters around the character. For now, we will use a simple method to randomly place monsters around the player. In a future chapter, we will locate monsters with the help of a web service.
At this point, we have already covered a fair amount of scripting, and we have more to do by the end of the chapter. Also, the scripting changes we need to make are more intricate and prone to mistakes. So, in order to avoid putting you through that turmoil, we will import the next section of changes. For the rest of this chapter, we will switch between manual edits and script imports wherever appropriate. Perform the following instructions to do the first script asset import:
- From the Unity editor menu, select Assets | Import Package | Custom Package...
- When the Import package... dialog opens, navigate to where you placed the...