LeprovostQuentin / mt4j

Automatically exported from code.google.com/p/mt4j
GNU General Public License v2.0
0 stars 0 forks source link

Add keyEvent() to Physics example #47

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run the physics example

What is the expected output? What do you see instead?
the physics example produces a runtime error since it cannot find a 
keyEvent(...) method.

What version of the product are you using? On what operating system?
v0.98 on windows

Please provide any additional information below.
it can be solved by adding the method. It worked after i added the 
keyEvent(...) method from the hockey example: 

    /**
     * 
     * @param e
     */
    public void keyEvent(KeyEvent e){
        int evtID = e.getID();
        if (evtID != KeyEvent.KEY_PRESSED)
            return;
        switch (e.getKeyCode()){
        case KeyEvent.VK_BACK_SPACE:
            app.popScene();
            break;
            default:
                break;
        }
    }

Original issue reported on code.google.com by jeroen.c...@gmail.com on 12 Nov 2012 at 4:40