Sha256: 0479604a4e90c08d2f7ef485521ea1bc031760066d22988f1f0020b31a17e17d
Contents?: true
Size: 652 Bytes
Versions: 1
Compression:
Stored size: 652 Bytes
Contents
$: << File.expand_path(File.dirname(__FILE__) + "/../../lib") $: << File.expand_path(File.dirname(__FILE__) + "/../../ext") def path_of(res) File.expand_path(File.dirname(__FILE__) + "/../../spec/res/#{res}") end require 'ray' class HelloScene < Ray::Scene scene_name :hello def setup @font = font(path_of("VeraMono.ttf"), 12) end def render(win) @font.draw("Hello world!", :on => win, :at => [0, 0]) end end class HelloWorld < Ray::Game def initialize super("Hello world!") HelloScene.bind(self) push_scene :hello end def register add_hook :quit, method(:exit!) end end HelloWorld.new.run
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ray-0.0.1 | samples/hello_world/hello.rb |