Victims included both children and adults, police said in a statement, adding that the gunman was an ex-police officer.