Robert Pattinson to play Batman