From 45baaafc59bb3f25bf86d373cd0e960e92304dc8 Mon Sep 17 00:00:00 2001 From: iddoeldor Date: Tue, 24 Jul 2018 20:16:59 +0300 Subject: [PATCH] Update unity.js --- scripts/unity.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/unity.js b/scripts/unity.js index c70f1a0..6726488 100644 --- a/scripts/unity.js +++ b/scripts/unity.js @@ -1,10 +1,10 @@ -// bytes 2 hex 2 string -function b2h2s(array, n) { +function b2h2s(array, n) { // bytes 2 hex 2 string var result = ''; for (var i = 0, l = n ? n: 100; i < l; ++i) { result += ('0' + (array[i] & 0xFF).toString(16)).slice(-2); } // hex 2 string + // TODO improve, no need to iterate twice, read fromCharCode in first iteration // TODO extract facebookID from previous_winners packet var string = ''; for (var i = 0; i < result.length; i += 2) { @@ -33,6 +33,7 @@ Java.perform(function() { }); + /* {"status":"Success","gameState":"Waiting To Show Question","questionIndex":0,"gameID":"5b575b2bd3bff ******************************