mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 15:42:35 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user