Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by pussard

Greetings,

I can't seem to get any keyboard inputs working at all. Mouse clicks are fine, but nothing happens for any keyboard key. I've tried this in Chrome and Firefox with all addons disabled and still no dice. I change to MOUSE1 and it works. I'm running version 1.23.

ig.module( 
	'game.main' 
)
.requires(
	'impact.game',
	'impact.font'
)
.defines(function(){

MyGame = ig.Game.extend({
	
	init: function() {

		ig.input.bind(ig.KEY.LEFT_ARROW, 'left');
	},
	
	update: function() {
		if (ig.input.state('left')) {
			console.log('left');
		}
		this.parent();
	},
	draw: function() {
		this.parent();
	}
});

ig.main( '#canvas', MyGame, 60, 768, 672, 1 );

});

1 decade ago by pussard

I resolved the issue. It was my IDE that refactored and modified the ImpactJS engine itself!

1 decade ago by linka

hi
i currently found a semi-answer to your problem at this website -
http://myunittesting.com/
hope you would appreciate it
Page 1 of 1
« first « previous next › last »