1 decade ago by dmen
I have a game level, and also an entity that both do:
ig.input.bind(ig.KEY.MOUSE1, 'leftMouse');
The entity is a dialog that I fade out and then kill. It seems that once the entity is killed my game class is no longer getting input on the leftMouse action. In the update() method of the game class I do a console log - and then also do a console log if ig.input.pressed('leftMouse') occurs.
Before the dialog fades, I get both traces - from the update, and the press. Once the dialog is gone, I only get the update trace - no longer does ig.input.pressed('leftMouse') do anything.
I tried changing 'leftMouse' in the dialog to something else - like 'lmDialog' but then the mouse doesn't work in the dialog at all?
I seem to not be understanding something about ig.input. Please help.
ig.input.bind(ig.KEY.MOUSE1, 'leftMouse');
The entity is a dialog that I fade out and then kill. It seems that once the entity is killed my game class is no longer getting input on the leftMouse action. In the update() method of the game class I do a console log - and then also do a console log if ig.input.pressed('leftMouse') occurs.
Before the dialog fades, I get both traces - from the update, and the press. Once the dialog is gone, I only get the update trace - no longer does ig.input.pressed('leftMouse') do anything.
I tried changing 'leftMouse' in the dialog to something else - like 'lmDialog' but then the mouse doesn't work in the dialog at all?
I seem to not be understanding something about ig.input. Please help.