diff --git a/2oppg7ptas.js b/2oppg7ptas.js new file mode 100644 index 0000000..6bde8aa --- /dev/null +++ b/2oppg7ptas.js @@ -0,0 +1,77 @@ +if (this.parentEntity === data.entity) { + console.log('Entity Impact Test Loaded'); +} else { + return; +} + +if (!this.initialized) { + + var texture = GameLib.EntityManager.Instance.findComponentById('77dqs286vu'); + + this.initialized = true; +} + +ig.System.inject({ + init : function( canvasId, fps, width, height, scale ) { + this.fps = fps; + + this.clock = new ig.Timer(); + this.canvas = GameLib.EntityManager.Instance.findComponentById(canvasId).instance; + this.resize( width, height, scale ); + this.context = this.canvas.getContext('2d'); + + this.getDrawPos = ig.System.drawMode; + + // Automatically switch to crisp scaling when using a scale + // other than 1 + if( this.scale != 1 ) { + ig.System.scaleMode = ig.System.SCALE.CRISP; + } + ig.System.scaleMode( this.canvas, this.context ); + } +}) + +ig.module( + 'game.impact-test' +) +.requires( + 'impact.font', + 'impact.game', + 'impact.image', + 'game.levels.snake' +) +.defines(function(){ + + // code for this module + + // Create your own game class + ig.global.Snake = ig.Game.extend( + + { + font: new ig.Font( 'media/04b03.font.png' ), + + init: function() { + // initialize your game world, bind some + // keys, etc. + ig.input.bind( ig.KEY.SPACE, 'jump' ); + + console.log('init called'); + this.loadLevel( LevelSnake ); + }, + + draw : function() { + texture.instance.needsUpdate = true; + this.parent(); + } + } + ); + + var size = GameLib.Utils.GetWindowSize(); + + // Start your game + // 60fps, 320x240 pixels, scaled up by a factor of 2 + ig.main('1cvwv04mfw', Snake, 60, 64 * 16, 64*16, 1 ); + +}); + +//@ sourceURL=entityLoaded.js \ No newline at end of file