Game Development Reference
In-Depth Information
Building the animated sprites
After right-clicking inside the
Content Browser
window you can choose the
Sprite Flip-
book
type from within the
Animation
submenu to be able to add an empty animated sprite
to your project directory.
Double-click on this new asset to open the sprites animation editor, which is a very simple
and easy-to-use editor.
To keep the animations as simple as possible, I built only five of them:
•
enemyGreen
: This is the main and only animation for the green type of enemy
creature.
•
enemyRed
: This is the main and only animation for the red type of enemy
creature.
•
scientistIdle
: This is the idle animation for the player character that will be used
while there are no inputs.
•
scientistShoot
: This is the animation that will be used when the player presses the
fire button.
•
scientistWalk
: As in the previous chapter, this animation will be used while there
is a horizontal movement input.
By selecting all of the frames from the
Sprites
folder and dragging them, as we did in
imation editor, you can place them into this animated sprite and you'll be able to see a live
view of the frames playing.
Some of these animations have been made at 24 FPS, and others at 15 FPS; you'll need to
adjust this property in the right-hand side panel of the animation editor, so remember to ask
your animator about the frame rate used.
Search WWH ::
Custom Search