Game Development Reference
In-Depth Information
The following figure shows the methods calls stack. Important to note here is that all
the methods are protected, meaning that we can customize default behavior of the
class at any step on the way.
In order to provide our own customized login screen, we simply override the
initLoginScreen
. If we wanted something fancy during the splash, we could
override the
splash
method. On the other hand, if we simply wanted to provide a
different sprite for the splash instead of the default, we would override the
getSplash
method.
We could also entirely skip the splash screen by overriding the splash method and
calling
onSplashDone,
as shown below:
protected override function splash():void {
onSplashDone();
}
If the
splash
method is completely overridden, it is the subclass's responsibility to
call the
onSplashDone
method after the splash screen has done its thing. The default
behavior of
onSplashDone
is simply to call the
start
method.