GameState
class that has the same callback methods as Gosu::Window
does ( draw
, update
, ...). The window has "one" state at all times, and forwards all its callbacks to it.GameState
instance of the main window. The pattern is very flexible. For example, if a dialog box state wants to show the game in the background, it can just have a reference to the "last state" and in its draw
method, it can first draw the old state, then draw its information on top. You can also realise transitions in a similar way.$scene
is a class that handles a scene. Window#update
calls $scene.main
and calls a draw in the window draw method.Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill