summaryrefslogtreecommitdiffhomepage
path: root/mrblib/raylib.rb
blob: 0f542c9371206cc1309bb3aace8048498b347481 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module Raylib
  class << self
    attr_accessor :main_loop

    def while_window_open(&block)
      self.main_loop = block
      if Raylib.platform == 'desktop'
        while !Raylib.window_should_close? do
          self.main_loop.call
        end
      elsif Raylib.platform == 'web'
        Raylib.emscripten_set_main_loop
      end
    end

    def test
      puts 'hello'
    end
  end
end