mcgluszak

Gosu-gluszak

Apr 24th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.98 KB | None | 0 0
  1. module Gluszak
  2.     require 'gosu'
  3.     include Gosu
  4.     class Window < Gosu::Window
  5.         def initialize(width=640, height=480, fullscreen=false, update_interval = 16.666666)
  6.             super(width, height, fullscreen, update_interval)
  7.             $window = self
  8.         end
  9.     end
  10.    
  11.     class Image < Gosu::Image
  12.         def initialize(filename_or_rmagick_image, tileable=false, *args)
  13.             super($window, filename_or_rmagick_image, tileable, *args)
  14.         end
  15.        
  16.         def self.from_text(text, font_name, font_height, *args)
  17.             super($window, text, font_name, font_height, *args)
  18.         end
  19.        
  20.         def self.load_tiles(filename_or_rmagick_image, tile_width=-1, tile_height=-1, tileable=false)
  21.             super($window, filename_or_rmagick_image, tile_width, tile_height, tileable)
  22.         end
  23.     end
  24.    
  25.     class Sample < Gosu::Sample
  26.         def initialize(name)
  27.             super($window, name)
  28.         end
  29.     end
  30.    
  31.     class Song < Gosu::Song
  32.         def initialize(name)
  33.             super($window, name)
  34.         end
  35.     end
  36.    
  37.     class Font < Gosu::Font
  38.         def initialize(name="Arial", size=12)
  39.             super($window, name, size)
  40.         end
  41.     end
  42. end
Advertisement
Add Comment
Please, Sign In to add comment