Advertisement
Guest User

Untitled

a guest
May 28th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.37 KB | None | 0 0
  1. require 'gosu'
  2.  
  3. class Window < Gosu::Window
  4.   def initialize
  5.     super 640, 480, false
  6.     self.caption = 'Hello world!'
  7.     @background_image = Gosu::Image.new(self, 'background.png', true)
  8.     @bgmusic = Gosu::Song.new(self, 'song.ogg')
  9.     @bgmusic.play true
  10.   end
  11.  
  12.   def draw
  13.     @background_image.draw(0, 0, 0)
  14.   end
  15. end
  16.  
  17. window = Window.new
  18. window.show
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement