And they're all precisely timed.
When a monster gets hit, the animation for the monster changes so
that it becomes one of monster being damaged, something like that.
So as we look at that, we look at that as an idea of
why it might be helpful to have some support for animations and for events.
That's kind of the reason why SKAction is so
powerful and why you might want to use it in a game that we have.
So in that specific example,
there's just an enormous amount of visual and auditory activity.
There're lots of independent sprites moving around and animating
just in that example features sort of to explain to you how much was going on.
You had enemies, for example these zombies, they had animations associated
with them and they had a movement associated with them.
We had environmental objects, there was this lily pad,
and that lily pad is slightly animated and has a role in the gameplay.
We had things that were basically game objects,
like the sun icon that bounced around and gave you power, or
this leaf icon that bounced around and gave you a power up, or this
bullet which is being fired a pea which should be fired from one of the plants.
Those are all game objects of some sort, that were being animated and
moved kind of independently from everything else.
There are all kinds of visual notification.
For example, your score was up there and getting animated.
There was this low tide warning at the beginning,
and then I don't know if you noticed it but down at the bottom,
there were these power-up icons that were flashing at the same time.
So on top of that, you can also have particle systems.
Now, there was one sort of electrical effect that was going on during the game.
I don't actually think that was a particle system but we'll use it as a stand-in for
a particle system.
You have water moving.
You also had a whole bunch of ambient sounds that were playing, so
listen to all the sounds that were playing.
[SOUND].
You have a background music.
You have the sound of things being fired.
Weapons being fired.
You have the sound of things being hit.
You have groans from the zombies, whatever that is.
[SOUND] Each one of those sounds is an action as well
that's being triggered by some kind of an event.
Now it's not that these categories I put on the left are some kind of exhaustive or
meaningful categorization of the different elements in the game.
I'm just sort of categorizing them on the fly here to show you
just what a wide range of kinds of events and animations and
sounds were all being triggered in a very specific order.
You don't want the zombie to appear to be damaged until it's been
hit by the object and you don't want the sound of the zombie dying to
be played until the zombie's actually dying, so there's a lot going on.
So we can use the SKAction class in order to.