Update: impact_snake_loaded (o7s7v9qq97.js) 556 bytes modified
parent
0b361f0444
commit
7b2e99afa3
|
@ -5,6 +5,26 @@ if (this.parentEntity === data.entity) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ig.System.inject({
|
||||||
|
init : function( canvasId, fps, width, height, scale ) {
|
||||||
|
this.fps = fps;
|
||||||
|
|
||||||
|
this.clock = new ig.Timer();
|
||||||
|
this.canvas = GameLib.EntityManager.findComponentById('ov13qo2j1m').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(
|
ig.module(
|
||||||
'game.impact-test'
|
'game.impact-test'
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue