Restored targetFps
Added hit detection code