window.addEventListener("message", function (msg) {
console.log('[PARENT => UNITY]', msg)
switch (msg.data.messageName) {
case EVENT.RECEIVED.PAUSE:
// Your PAUSE handler here
case EVENT.RECEIVED.RESUME:
// Your RESUME handler here
case EVENT.RECEIVED.QUESTIONS:
// Your QUESTIONS handler here
case EVENT.RECEIVED.LANGUAGE:
// Your LANGUAGE handler here
case EVENT.RECEIVED.START:
// Your START handler here
case EVENT.RECEIVED.STATE:
// Your STATE handler here
case EVENT.RECEIVED.INIT:
console.log('Unhandled message: ' + msg);