Sha256: ba073057a5da421a6ac69dcba8489b5a0be7d0ec3217faf670b7c39034f42449
Contents?: true
Size: 858 Bytes
Versions: 1
Compression:
Stored size: 858 Bytes
Contents
module GGLib class SplashScreen < Gosu::Window def initialize(width=640, height=480, img = "null.png", caption = "Loading...") super(width, height, false, 20) self.caption = caption @background_image = Gosu::Image.new(self, img, true) @done=false end #Override this method and include all initialization methods here *except for opening the window*. def load end #Override with method with the code needed to initialize the main application window. def createWindow end def update load @done=true if @done puts "\nLaunching in:\n3" sleep(1) puts "2" sleep(1) puts "1" sleep(1) puts "0" close createWindow end end def draw @background_image.draw(0, 0, 0) end end end #module GGLib
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gglib-1.1.0 | lib/ext/splash.rb |