MinieExamples/src/main/java/jme3utilities/minie/test/TestSoftBody.java
/**
     * Process an action that wasn't handled by the active input mode.
     *
     * @param actionString textual description of the action (not null)
     * @param ongoing true if the action is ongoing, otherwise false
     * @param tpf time interval between frames (in seconds, &ge;0)
     */
Process an action that wasn't handled by the active input mode.

@param actionString textual description of the action (not null)
@param ongoing true if the action is ongoing, otherwise false
@param tpf time interval between frames (in seconds, ≥0)
Process an action that wasn ' t handled by the active input mode . @param actionString textual description of the action ( not null ) @param ongoing true if the action is ongoing otherwise false @param tpf time interval between frames ( in seconds ≥0 )
@Override
    public void onAction(String actionString, boolean ongoing, float tpf) {
        final float halfExtent = 4f;
        float topY;
        if (ongoing) {
            switch (actionString) {
                case "go limp":
                    goLimp();
                    return;
                case "next":
                    nextPuppetAnimation();
                    nextWindVelocity();
                    return;
                case "test poleAndFlag":
                    testName = "poleAndFlag";
                    cleanupAfterTest();
                    float length = 0.4f;
                    attachWorldAxes(length);
                    topY = -2f;
                    attachCubePlatform(halfExtent, topY);
                    addPoleAndFlag();
                    return;
                case "test puppetInSkirt":
                    testName = "puppetInSkirt";
                    cleanupAfterTest();
                    topY = 0f;
                    attachCubePlatform(halfExtent, topY);
                    DynamicAnimControl dac = addPuppet();
                    addSkirt(dac);
                    return;
                case "test squishyBall":
                    testName = "squishyBall";
                    cleanupAfterTest();
                    topY = 0f;
                    attachCubePlatform(halfExtent, topY);
                    addSquishyBall(1.5f);
                    return;
                case "test tablecloth":
                    testName = "tablecloth";
                    cleanupAfterTest();
                    topY = -1f;
                    attachCubePlatform(halfExtent, topY);
                    topY = 1.7f;
                    addCylinder(topY);
                    float startY = 2f;
                    addTablecloth(startY);
                    return;
            }
        }
        super.onAction(actionString, ongoing, tpf);
    }
@ Override public void onAction ( String actionString , boolean ongoing , float tpf ) { final float halfExtent = 4f ; float topY ; if ( ongoing ) { switch ( actionString ) { case "go limp" : goLimp ( ) ; return ; case "next" : nextPuppetAnimation ( ) ; nextWindVelocity ( ) ; return ; case "test poleAndFlag" : testName = "poleAndFlag" ; cleanupAfterTest ( ) ; float length = 0.4f ; attachWorldAxes ( length ) ; topY = - 2f ; attachCubePlatform ( halfExtent , topY ) ; addPoleAndFlag ( ) ; return ; case "test puppetInSkirt" : testName = "puppetInSkirt" ; cleanupAfterTest ( ) ; topY = 0f ; attachCubePlatform ( halfExtent , topY ) ; DynamicAnimControl dac = addPuppet ( ) ; addSkirt ( dac ) ; return ; case "test squishyBall" : testName = "squishyBall" ; cleanupAfterTest ( ) ; topY = 0f ; attachCubePlatform ( halfExtent , topY ) ; addSquishyBall ( 1.5f ) ; return ; case "test tablecloth" : testName = "tablecloth" ; cleanupAfterTest ( ) ; topY = - 1f ; attachCubePlatform ( halfExtent , topY ) ; topY = 1.7f ; addCylinder ( topY ) ; float startY = 2f ; addTablecloth ( startY ) ; return ; } } super . onAction ( actionString , ongoing , tpf ) ; }
Process an action that wasn't handled by the active input mode.
Process an action that wasn ' t handled by the active input mode .