class RubyFighter::Backdrop
Public Class Methods
new(window, filename)
click to toggle source
Calls superclass method
# File lib/ruby_fighter/backdrop.rb, line 5 def initialize(window, filename) super(window, "assets/#{filename}", false) @scale = window.height / height @bg_x = -(width * @scale - window.width) / 2 end
Public Instance Methods
draw()
click to toggle source
Calls superclass method
# File lib/ruby_fighter/backdrop.rb, line 12 def draw super @bg_x, 0, 0, @scale, @scale end