1 decade ago by hellagot
Hi,
i am trying to put code i want to use in further games in to a own library, so i created a new directory in the same directory where game and impact resides, lets say mylib
Within mylib i created test.js:
and in my main.js is add to the 'requires' array a entry named 'mylib.test'
This does work without parse errors, but as soon as i do a
I get a 'Test is not defined' error.
How can i achieve something like this.
i am trying to put code i want to use in further games in to a own library, so i created a new directory in the same directory where game and impact resides, lets say mylib
Within mylib i created test.js:
ig.module( 'mylib.test' ) .requires( 'impact.debug.debug' ) .defines(function(){ var Test = ig.Class.extend({ draw: function() { ig.log( "draw" ); } }); });
and in my main.js is add to the 'requires' array a entry named 'mylib.test'
This does work without parse errors, but as soon as i do a
var t = new Test();
I get a 'Test is not defined' error.
How can i achieve something like this.