From cbfce01bce4bd082b238a378bb11868e76b4a6d6 Mon Sep 17 00:00:00 2001 From: Tom Black Date: Fri, 25 Dec 2015 23:18:53 -0600 Subject: Store frame rate --- lib/ruby2d/window.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/ruby2d/window.rb b/lib/ruby2d/window.rb index a56e8d5..3f5dd1a 100644 --- a/lib/ruby2d/window.rb +++ b/lib/ruby2d/window.rb @@ -8,6 +8,7 @@ module Ruby2D @width, @height, @title = width, height, title @mouse_x = @mouse_y = 0 @fps_cap = fps + @fps = 0 @vsync = vsync @objects = [] @@ -27,6 +28,8 @@ module Ruby2D return @width when :height return @height + when :fps + return @fps when :mouse_x return @mouse_x when :mouse_y -- cgit v1.2.3