Never wanting to touch Javascript after having discovered the wonders of CoffeeScript I took a quick look at how to get a hello-world example working with CoffeeScript & GameClojure... here's the code:
A couple of points of note here are:
- exports is backtick-escaped so as to render directly to javascript as the engine requires exports to have global scope.
- CoffeeScript's implementation of inheritance replaces GameClosures 'Class(<super class>, func...' inheritance helper function (and is much nicer IMO) as seen in their javascript implementation of hello-world.
Hopefully it's this easy with, non-trivial, GameClosure applications.
No comments:
Post a Comment