Chapter 4. No Longer Alone – Sweet-Toothed Pandas Strike
"They are angry and they are hungry. Beware, the sweet-tooth pandas are getting closer for your delicious cake!
Animations and artificial intelligence are at the core of giving life to an Non-Playing Characters (NPCs) or complex objects in games. The former makes NPCs appear dynamic and not static; the latter gives them an intelligence, with which they can move and act into the world.
This chapter explains how to use the animation system of Unity, with a particular focus on 2D animations. We will cover artificial intelligence and what it can do in video games later in the book.
The first part of the chapter will focus on the rich and sophisticated animation system of Unity (sometimes referred to as Mecanim). In explaining each part, we will bring, bit by bit, our evil pandas to life.
However, in the second part of the chapter, we will give the evil pandas the possibility to move around the map, to trigger actions...