jumpingAnimation = new AnimationModel( false, jumpingAnimationSpeed, 2, 8 );
addToStack( jumpingAnimation );
fallingAnimation = new AnimationModel( true, jumpingAnimationSpeed, 1, 10 );
jumpingAnimation.nextModels.addLast( new ModelActivator( fallingAnimation ) );
addToStack( fallingAnimation );
addToStack( movementAnimation );
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 );
hitPauseCondition.trueModels.addLast( hitKeyDown );
hitKeyDown.trueModels.addLast( hitPauseCondition );
IsModelActive onLandCondition2 = new IsModelActive( onLand );
onLandCondition2.trueModels.addLast( new ModelActivator( punchingAnimation ) );
onLandCondition2.trueModels.addLast( new HittingArea( true ) );
onLandCondition2.trueModels.addLast( hitKeyDown );
onLandCondition2.falseModels.addLast( new ModelActivator( kickingAnimation ) );
onLandCondition2.falseModels.addLast( new HittingArea( false ) );
onLandCondition2.falseModels.addLast( hitKeyDown );
hitPauseCondition.falseModels.addLast( onLandCondition2 );