Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning AndEngine

You're reading from   Learning AndEngine Design and create Android games with the simple but powerful tool AndEngine

Arrow left icon
Product type Paperback
Published in Sep 2014
Publisher
ISBN-13 9781783985968
Length 286 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Martin Varga Martin Varga
Author Profile Icon Martin Varga
Martin Varga
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Adding animations using entity modifiers


We used animations in Chapter 5, Basic Interactions, and in Chapter 6, Physics, we learned how to use the physics engine to move objects. We are going to use the same techniques from Chapter 5, Basic Interactions, to create simple animated effects and we will use them in the menu scene. We are going to cover entity modifiers in more detail here.

As we already learned, entity modifiers are used for tweening: changing a position, rotation, or size of an object from one state to another. We also know that the tweening can be linear, which means the same speed of change from state A to state B for the whole duration, or we can use easing functions to change the behavior of the tween.

Chaining modifiers

The entity modifiers can also be chained together. A sprite can rotate and move at the same time. There are two ways of chaining: parallel and sequence.

The following figure shows how parallel chaining looks. All the modifiers will run at the same time, but...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime