Package dwlab.behavior_models

Examples of dwlab.behavior_models.IsButtonActionDown



    attachModel( movementControl );


    IsButtonActionDown jumpKeyDown = IsButtonActionDown.create( jumpKey );
    attachModel( jumpKeyDown );
    jumpKeyDown.falseModels.addLast( jumpKeyDown );

    IsModelActive onLandCondition = new IsModelActive( onLand );
    jumpKeyDown.trueModels.addLast( onLandCondition );

    onLandCondition.trueModels.addLast( new ModelActivator( jumpingAnimation ) );
    onLandCondition.trueModels.addLast( new ModelDeactivator( gravity ) );
    onLandCondition.falseModels.addLast( jumpKeyDown );

    FixedWaitingModel pauseBeforeJump = FixedWaitingModel.create( jumpingPause );
    pauseBeforeJump.nextModels.addLast( new Jump( jumpingStrength, jumpingStrength ) );
    pauseBeforeJump.nextModels.addLast( new ModelActivator( gravity ) );
    pauseBeforeJump.nextModels.addLast( jumpKeyDown );
    onLandCondition.trueModels.addLast( pauseBeforeJump );

    addToStack( jumpingAnimation, false );


    IsButtonActionDown hitKeyDown = IsButtonActionDown.create( hitKey );
    attachModel( hitKeyDown );
    hitKeyDown.falseModels.addLast( hitKeyDown );

    IsModelActive hitPauseCondition = new IsModelActive( hitPause );
    hitPauseCondition.falseModels.addLast( hitPause );
View Full Code Here

TOP

Related Classes of dwlab.behavior_models.IsButtonActionDown

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.