Replaced usage of with CommonMethods.window (which uses ), refactored InputMapper to match actions to keys and visa-versa, removed categories from InputMapper, moved input mappings from Camera and Player into InputMapper (for now.)

This commit is contained in:
2019-02-22 14:55:06 -06:00
parent 8b65973f6f
commit 6191699d8b
11 changed files with 178 additions and 121 deletions

View File

@@ -10,15 +10,15 @@ class IMICFPS
def delta_time
(Gosu.milliseconds-@delta_time)/1000.0
end
def button_down?(id); $window.button_down?(id); end
def button_down?(id); window.button_down?(id); end
def mouse_x; $window.mouse_x; end
def mouse_y; $window.mouse_y; end
def mouse_x=int; $window.mouse_x=int; end
def mouse_y=int; $window.mouse_y=int; end
def mouse_x; window.mouse_x; end
def mouse_y; window.mouse_y; end
def mouse_x=int; window.mouse_x=int; end
def mouse_y=int; window.mouse_y=int; end
def gl(&block)
$window.gl do
window.gl do
block.call
end
end
@@ -32,13 +32,13 @@ class IMICFPS
end
def draw_rect(*args)
$window.draw_rect(*args)
window.draw_rect(*args)
end
def draw_quad(*args)
$window.draw_quad(*args)
window.draw_quad(*args)
end
def fill(color = Gosu::Color::WHITE)
draw_rect(0, 0, $window.width, $window.height, color)
draw_rect(0, 0, window.width, window.height, color)
end
end
end