This commit is contained in:
@@ -26497,14 +26497,14 @@ cr.behaviors.lunarray_Tween = function(runtime)
|
||||
};
|
||||
}());
|
||||
cr.getObjectRefTable = function () { return [
|
||||
cr.plugins_.SenaPlugin,
|
||||
cr.plugins_.Sprite,
|
||||
cr.plugins_.Touch,
|
||||
cr.plugins_.Text,
|
||||
cr.plugins_.Audio,
|
||||
cr.plugins_.Browser,
|
||||
cr.plugins_.Function,
|
||||
cr.plugins_.JSON,
|
||||
cr.plugins_.SenaPlugin,
|
||||
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
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": 1772161690,
|
||||
"version": 1772190648,
|
||||
"fileList": [
|
||||
"data.js",
|
||||
"c2runtime.js",
|
||||
|
||||
@@ -119,6 +119,7 @@ SenaSDK.prototype.loadFromPostMessage = function (inputJson, callback) {
|
||||
console.warn("⚠️ Sena SDK: tdv_sdk not found, storing data locally");
|
||||
self.data = inputJson.data;
|
||||
self.correctAnswer = inputJson.answer;
|
||||
self._parseGameCode(); // Thêm dòng này để SDK đọc đuôi thời gian T30
|
||||
if (callback) callback(true);
|
||||
}
|
||||
return true;
|
||||
@@ -154,7 +155,7 @@ SenaSDK.prototype.loadFromPostMessage = function (inputJson, callback) {
|
||||
// Lưu trữ danh sách gốc
|
||||
self.masterList = [...self.data.options];
|
||||
// Tính tổng số level
|
||||
self.totalLevels = Math.ceil(self.masterList.length / self.itemCount);
|
||||
self.totalLevels = Math.ceil(self.masterList.length / 6);
|
||||
self.currentLevel = 0;
|
||||
|
||||
// Load Level 1 ngay lập tức để self.data.options chỉ chứa 6 card đầu
|
||||
@@ -518,7 +519,7 @@ SenaSDK.prototype._loadFromServer = function (
|
||||
// Lưu trữ danh sách gốc
|
||||
self.masterList = [...self.data.options];
|
||||
// Tính tổng số level
|
||||
self.totalLevels = Math.ceil(self.masterList.length / self.itemCount);
|
||||
self.totalLevels = Math.ceil(self.masterList.length / 6);
|
||||
self.currentLevel = 0;
|
||||
|
||||
// Load Level 1 ngay lập tức để self.data.options chỉ chứa 6 card đầu
|
||||
@@ -1037,6 +1038,9 @@ SenaSDK.prototype.getHintValue = function (index) {
|
||||
SenaSDK.prototype.start = function () {
|
||||
let self = this;
|
||||
|
||||
// LUÔN GÁN THỜI GIAN BẮT ĐẦU Ở ĐÂY
|
||||
self.startTime = Date.now();
|
||||
|
||||
// Nếu là matching game, forward sang tdv_sdk.start()
|
||||
if (self.isMatchingGame) {
|
||||
console.log("🎮 Sena SDK: Matching game - forwarding start() to tdv_sdk");
|
||||
@@ -1051,7 +1055,6 @@ SenaSDK.prototype.start = function () {
|
||||
if (self.shuffle && self.data && self.data.options) {
|
||||
self.shuffleArray(self.data.options);
|
||||
}
|
||||
self.startTime = Date.now();
|
||||
// Additional logic for tracking can be added here if needed
|
||||
};
|
||||
|
||||
@@ -1733,7 +1736,7 @@ SenaSDK.prototype.loadLevelG5 = function (levelIndex) {
|
||||
if (self.gameType !== 5 || !self.masterList) return false;
|
||||
|
||||
self.currentLevel = levelIndex;
|
||||
let count = self.itemCount; // Số card tối đa mỗi trang (VD: 6)
|
||||
let count = 6; // Khóa cứng max 6 card/trang cho G5
|
||||
|
||||
window.Sena_TotalLevels = Math.ceil(self.masterList.length / count);
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user