@Override
    public void update(long deltaMs) {
        speed += maxAcceleration * accelerationRate * deltaMs;
        if(speed > maxSpeed) {
            speed = maxSpeed;
        }
        if(speed < 0) {
            speed = 0;
        }
        
        float speedX = -(float)(speed * Math.cos(angleRad));
        float speedY = -(float)(speed * Math.sin(angleRad));
        
        float oldX = x;
        float oldY = y;
        float newX = x + speedX * (float)(deltaMs / 1000f);
        float newY = y + speedY * (float)(deltaMs / 1000f);
        
        if(oldX != newX || oldY != newY) {
            setLocation(newX, newY);
        }
        
        if(turnSpeed > 0) {
            turn(deltaMs);
        }
        
        lived += deltaMs;
        if(lifetime != 0 && lived >= lifetime) {
            Application.get().getEventManager().queueEvent(new ActorDestroyedEvent(owner));
        }
    }