@Override
    public void execute(GameActor character, CharacterAction action) {

        if (!running) {

            stoppable = false;
            running = true;
            counter = 0;
            character.updateVelocity(0, 0);
        }

        counter++;

        System.out.println("Counter : " + counter);
        if (counter % loadTime == 0) {
            switch (action) {
                case MOVELEFT:
                    character.updatePosition(-dx, 0);
                    break;
                case MOVERIGHT:
                    character.updatePosition(dx, 0);
                    break;
                case JUMPLEFT:
                    character.updatePosition(-dx, -dy);
                    character.updateVelocity(-7, -10);
                    character.setOnGround(false);
                    break;
                case JUMPRIGHT:
                    character.updatePosition(dx, -dy);
                    character.updateVelocity(7, -10);
                    character.setOnGround(false);
                    break;
                case JUMP:
                    character.updatePosition(0, -dy);
                    character.updateVelocity(0, -10);
                    character.setOnGround(false);
                    break;
                default:
                    break;
            }
            running = false;
            stoppable = true;
            //spriteAnimation.resetIndex();
            character.setCurrentAction(action);
        }


    }