Examples of JoyAxisEvent


Examples of com.jme3.input.event.JoyAxisEvent

                        x = -1f; y = 1f;
                    }else if (v == POV.UP_RIGHT){
                        x = 1f; y = 1f;
                    }

                    JoyAxisEvent evt1 = new JoyAxisEvent(stick.povX, x);
                    JoyAxisEvent evt2 = new JoyAxisEvent(stick.povY, y);
                    listener.onJoyAxisEvent(evt1);
                    listener.onJoyAxisEvent(evt2);
                }else if (id instanceof Axis){
                    float value = e.getValue();
                   
                    JoystickAxis axis = stick.axisIndex.get(e.getComponent());
                    JoyAxisEvent evt = new JoyAxisEvent(axis, value);
                    listener.onJoyAxisEvent(evt);
                }else if (id instanceof Button){
                   
                    JoystickButton button = stick.buttonIndex.get(e.getComponent());                   
                    JoyButtonEvent evt = new JoyButtonEvent(button, e.getValue() == 1f);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.