Police say the gunman was shot by police and was taken to the hospital.