The gunman, who law enforcement officials have not named, went floor to floor in Beam Hall and was only stopped by campus police officers who engaged him in a shootout.