public void setCurrentAction(CharacterAction action) {

        switch (action) {
            case MOVERIGHT:
            case MOVELEFT:
                currentAction = move;
                currentAnimation = actionAnimations.get(currentAction);
                break;
            case JUMP:
            case JUMPLEFT:
            case JUMPRIGHT:
                currentAction = jump;
                currentAnimation = actionAnimations.get(currentAction);
                break;
            case ATTACK:
                currentAction = attack;
                currentAnimation = actionAnimations.get(currentAction);
                break;
            case SPECIALACTION1:
                currentAction = specialAction1;
                currentAnimation = actionAnimations.get(currentAction);
                break;
            case IDLE:
            default:
                currentAction = idle;
                currentAnimation = actionAnimations.get(currentAction);
                break;
        }
        //System.out.println(""+currentAction);
    }