Package com.ardor3d.input

Examples of com.ardor3d.input.ControllerState


import com.google.common.base.Predicate;

public final class AnyControllerCondition implements Predicate<TwoInputStates> {

    public boolean apply(final TwoInputStates states) {
        final ControllerState oldState = states.getPrevious().getControllerState();
        final ControllerState currentState = states.getCurrent().getControllerState();

        final boolean apply = !oldState.equals(currentState);
        return apply;
    }
View Full Code Here


        controllerName = controller;
    }

    public boolean apply(final TwoInputStates states) {
        boolean apply = false;
        final ControllerState currentState = states.getCurrent().getControllerState();
        final ControllerState previousState = states.getPrevious().getControllerState();

        if (!previousState.equals(currentState)) {
            if (controllerName == null) {
                controllerName = currentState.getControllerNames().get(controllerIndex);
            }
            final List<ControllerEvent> events = currentState.getEvents();
            for (final ControllerEvent event : events) {
View Full Code Here

        componentName = component;
    }

    public boolean apply(final TwoInputStates states) {
        boolean apply = false;
        final ControllerState currentState = states.getCurrent().getControllerState();
        final ControllerState previousState = states.getPrevious().getControllerState();

        if (!previousState.equals(currentState)) {

            if (controllerName == null) {
                controllerName = currentState.getControllerNames().get(controllerIndex);
            }
            if (componentName == null) {
View Full Code Here

TOP

Related Classes of com.ardor3d.input.ControllerState

Copyright © 2018 www.massapicom. 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.