Created
June 12, 2014 19:05
-
-
Save fkaa/ac385188e9be18f65098 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'kaffeh' | |
| class SomeGame < Game | |
| def initialize(config) | |
| cfg = Config.new(config) | |
| Window.set_size cfg.get?('width', 320), cfg.get?('height', 240) | |
| Window.set_title cfg.get?('title', 'Kaffeh!') | |
| cfg.save | |
| end | |
| def start | |
| p "start" | |
| end | |
| def update(delta) | |
| end | |
| def draw | |
| end | |
| def close | |
| p "close" | |
| end | |
| end | |
| Kaffeh.launch(SomeGame.new('./config.json')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment