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
:
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...