# File examples/BasicExample.rb, line 18 def initialize super(640, 480, false, 20) self.caption = "GGLib Tutorial" #Rather than override methods such as update, button_down, #and draw, as we would with plain Gosu code, we will override #these methods in state objects. This allows the user to switch #between various game states, such as between menus and the #actual game, without having to litter their functions with #switch statements or if-else statements. self.state = MyStateObj.new end