Implemented scene.waitfor(event)