Game Development Reference
In-Depth Information
• NPC colliders should be set to Triggers . We want to be able to control whether
the NPC should stop the player or not through the script instead of the physics
system. So, on Greybeard's Box Collider 2D , check Is Trigger .
With this done, start building up the rest of your town using the skills you have learned so
far. The following screenshot is what I came up with:
A few things to note are as follows:
• Organize your game hierarchy in a sensible manner so you can quickly find the
things you need to manage. In the preceding screenshot, I created empty game ob-
jects for Environment items, such as houses and bushes. I also created an empty
game object container for NPCs.
• Put the items on a layer that makes sense and then order the sprites on that layer
appropriately.
• I went to town on Greandal, the mayors' animation, to give him a pacing action
just to show how worried he is about the state of affairs in the town and the
troubles outside. Be sure to check the Curves tab when things don't go right.
Don't spend too long crafting the animation (unless you want to); all in all, the scene in
the preceding screenshot took about 10 minutes to put together.
Note
If you check the sample project, I also added a pacing animation for Greandal using
curves. We did this just to show how worried the mayor is about the state of affairs going
on outside the town and all the rampaging beasts.
Search WWH ::




Custom Search