Book Image

Mastering LibGDX Game Development

By : Patrick Hoey
Book Image

Mastering LibGDX Game Development

By: Patrick Hoey

Overview of this book

Table of Contents (18 chapters)
Mastering LibGDX Game Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Screen transitions


One simple but effective effect is to have a nice transition when the player travels from one location to another. Sometimes, just appearing in another location can be a jarring experience for the player. The following class diagram (Figure 1) shows the relationships for the two classes we will develop for this transition effect, ScreenTransitionActor and ScreenTransitionAction:

Figure 1

In order to develop ScreenTransitionActor and ScreenTransitionAction, we will need to do a little refactoring from Chapter 8, Oh, No! Looks Like Drama!, and move some of the core logic used in the cutscene transition into its logical component class. The ScreenTransitionActor class derives from the Image class and will essentially represent a black screen-sized transition. The ScreenTransitionAction class derives from the Action class and will be used during the animation frame cycle to update the ScreenTransitionActor object in order to display a nice smooth transition for the player. A...