Game Development Reference
In-Depth Information
if ( !m_showing ) {
trace("Already hidden!");
return;
}
m_showing = false;
}
public function isShowing():Boolean {
return m_showing;
}
For each screen, the init method is called once, where the subclass may initialize any
sprites it needs, ready to be displayed. The show and hide methods can be called
several times during the life of the game. The show method is called when the screen
is to be displayed and hide to remove it from display. All screen-swapping is done
by the showScreen method in PulseGame. If there is any custom screen class (for
example, a credits screen) other than those subclassed from the PulseUI framework,
it is recommended that it is inherited from the screen class so as to leverage the
existing screen management code.
The skinner class
The skinner class provides a simplistic way to change the UI specific to your game. It
is meant to provide a quick way to an alternative set of UI theme.
The skinner class provides the art asset for all the UI in the game except for the art
required for the game itself. It provides the background and buttons sprites for the
general UI. The skinner is designed to take in three PNG files, namely online.png ,
ui.png , and frame.png .
Outline.png provides the art that is behind everything, which means the outline is
drawn first and everything else is laid on top of it. From start to finish, the outline
does not change and is always seen if nothing draws to cover it.
 
Search WWH ::




Custom Search