class Stage
Public Class Methods
new(window)
click to toggle source
# File lib/scrit/stage.rb, line 4 def initialize(window) @window = window @backdrops = ["white"] @file = File.join(File.dirname(__FILE__), '..', 'backdrops', @backdrops[0] + ".png") @background_image = Gosu::Image.new(window, @file, true) end
Public Instance Methods
backdrops()
click to toggle source
# File lib/scrit/stage.rb, line 16 def backdrops @backdrops end
draw()
click to toggle source
# File lib/scrit/stage.rb, line 11 def draw #@background_image.draw(0, 0, ZOrder::Background) @background_image.draw_as_quad(0, 0, 0xffffffff, @window.width, 0, 0xffffffff, @window.width, @window.height, 0xffffffff, 0, @window.height, 0xffffffff, 0) end
switch_backdrop_to(name)
click to toggle source
# File lib/scrit/stage.rb, line 20 def switch_backdrop_to(name) @file = File.join(File.dirname(__FILE__), '..', 'backdrops', name + ".png") @background_image = Gosu::Image.new(@window, @file, true) end