Book Image

Corona SDK Mobile Game Development: Beginner's Guide

By : Michelle M Fernandez
Book Image

Corona SDK Mobile Game Development: Beginner's Guide

By: Michelle M Fernandez

Overview of this book

Table of Contents (19 chapters)
Corona SDK Mobile Game Development Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Let's get everything moving


We have introduced transitions in Chapter 3, Building Our First Game – Breakout, and briefly touched base with it. Let's go into more detail.

Transitions

The transition library allows you to create animations with only a single line of code by allowing you to tween one or more properties of a display object. We have discussed the basics of transitions back in Chapter 3, Building Our First Game – Breakout.

This can be done through the transition.to method, which takes a display object and a table that contains the control parameters. The control parameters specify the duration of the animation and the final values of properties for the display object. The intermediate values for a property are determined by an optional easing function, which is also specified as a control parameter.

The transition.to() method animates a display object's properties over time, using the "easing" algorithm.

The syntax is handle = transition.to( target, params ).

The return function is an...