Game Development Reference
In-Depth Information
No Longer Alone
Jumping, running, falling, dying; yeah, we got those. They rock. Now it's time to
explore our violent side and beat up some bad-guys! For your second "Quest", oh
warrior of Unity, it is time to add enemies. I suggest that you power up your official,
licensed, awesome B-movie electricity-emitting equipment—the ones that make the
cool sparks and zap noises.
Making enemies
The initial part of enemy creation is nothing you haven't already done, so let's just
dive in head first and see what's at the bottom:
1. Import the EnemySpritesheet.png file from the assets under Sprites\
Enemy\ and then create a sprite sheet for the enemy as discussed earlier
in Chapter 1 , Introduction to the 2D World of Unity .
2. Call the first sprite EnemyWalk_1 and the second sprite EnemyWalk_2 .
3.
Drag-and-drop the EnemyWalk_1 sprite into the Scene or the Hierarchy tab
to create the sprite in the world. If it looks a bit large to you, go ahead and
change the Scale to X: 41 , Y: 41 .
4.
Set the pivot of both sprites to be Bottom .
Search WWH ::




Custom Search