xoa logo
All checks were successful
Deploy to Production / deploy (push) Successful in 6s

This commit is contained in:
Đặng Minh Quang
2026-03-02 15:00:34 +07:00
parent 6c13227f6a
commit 865a70495a
44 changed files with 20 additions and 7 deletions

View File

@@ -26020,10 +26020,10 @@ cr.getObjectRefTable = function () { return [
cr.plugins_.Audio,
cr.plugins_.Browser,
cr.plugins_.Function,
cr.plugins_.Sprite,
cr.plugins_.SenaPlugin,
cr.plugins_.Touch,
cr.plugins_.Sprite,
cr.plugins_.Text,
cr.plugins_.Touch,
cr.behaviors.Rex_MoveTo,
cr.behaviors.Fade,
cr.behaviors.DragnDrop,

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 530 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,5 +1,5 @@
{
"version": 1772435608,
"version": 1772438376,
"fileList": [
"data.js",
"c2runtime.js",
@@ -22,7 +22,6 @@
"images/black-sheet0.png",
"images/hint-sheet0.png",
"images/imageframe-sheet0.png",
"images/newwords-sheet0.png",
"media/alert-234711.ogg",
"media/bubble-pop-389501.ogg",
"media/button-124476.ogg",

View File

@@ -1087,7 +1087,7 @@ SenaSDK.prototype.canReloadData = function () {
/**
* End the game and check answer
* [UPDATE] Support Unordered Answers & Auto-cleanup empty strings
* [UPDATE] Support Unordered Answers, Auto-cleanup empty strings & Post GAME_RESULT to FE
*/
SenaSDK.prototype.end = function (answer, callback) {
let self = this;
@@ -1217,11 +1217,25 @@ SenaSDK.prototype.end = function (answer, callback) {
};
// -----------------------------------------------------------
// [BƯỚC 3] Log và Return
// [BƯỚC 3] Log và Return (KÈM BẮN POST MESSAGE CHO FE)
// -----------------------------------------------------------
console.log(`Time spent: ${duration}s`);
console.log(`Result: ${isCorrect ? "CORRECT" : "INCORRECT"}`);
// THÊM MỚI: Bắn tín hiệu GAME_RESULT lên cho hệ thống FE tính điểm
window.parent.postMessage(
{
type: "GAME_RESULT",
payload: {
game_id: self.gameID || self.gameCode,
result: isCorrect ? "CORRECT" : "INCORRECT",
time_spent: duration,
},
},
"*",
);
console.log("📤 Sena SDK: GAME_RESULT sent successfully for Quiz/Sort/Fill");
if (callback) callback(result.isCorrect);
return result; // Return full object for debug
};

Binary file not shown.