Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'gosu'
- class Window < Gosu::Window
- def initialize
- super 640, 480, false
- self.caption = 'Hello world!'
- @background_image = Gosu::Image.new(self, 'background.png', true)
- @bgmusic = Gosu::Song.new(self, 'song.ogg')
- @bgmusic.play true
- end
- def draw
- @background_image.draw(0, 0, 0)
- end
- end
- window = Window.new
- window.show
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement