public void update() {
        switch (status) {
            case GOING:
                changeSpeed();
                move(direction);
                if (hasArrived()) {
                    stop();
                    setPosition(route.getEndRoute().getPosition());
                    setStatus(TransportStatus.DELIVERING);
                }
                break;
            case DELIVERING:
                if (getResources() == 0.0) {
                    setStatus(TransportStatus.RETURNING);
                    setDirection(Position.POSITION_MINUS100);
                } else {
                    deliver();
                }
                break;
            case RETURNING:
                changeSpeed();
                move(direction);
                if (hasReturned()) {
                    stop();
                    setPosition(route.getStartRoute().getPosition());
                    setStatus(TransportStatus.LOADING);
                }
                break;
            case LOADING:
                if (getResources() == MAX_CAPACITY) {
                    setStatus(TransportStatus.GOING);
                    setDirection(Position.POSITION_100);
                } else {
                    load();
                }
                break;
            default:
                break;
        }
    }