This commit is contained in:
@@ -22978,227 +22978,6 @@ cr.plugins_.Touch = function(runtime)
|
||||
}());
|
||||
;
|
||||
;
|
||||
cr.plugins_.remoteplugin = function (runtime) {
|
||||
this.runtime = runtime;
|
||||
};
|
||||
(function () {
|
||||
var pluginProto = cr.plugins_.remoteplugin.prototype;
|
||||
pluginProto.Type = function (plugin) {
|
||||
this.plugin = plugin;
|
||||
this.runtime = plugin.runtime;
|
||||
};
|
||||
var typeProto = pluginProto.Type.prototype;
|
||||
typeProto.onCreate = function () {
|
||||
};
|
||||
pluginProto.Instance = function (type) {
|
||||
this.type = type;
|
||||
this.runtime = type.runtime;
|
||||
this.curTag = "";
|
||||
this.curLoopIndex = 0;
|
||||
/*
|
||||
this.type = type;
|
||||
this.runtime = type.runtime;
|
||||
this.curTag = "";
|
||||
this.curLoopIndex = 0;
|
||||
this.gameBaseScore = 0;
|
||||
this.gameTicket = 0;
|
||||
this.gameRV = 0;
|
||||
this.gamePlatform = 0;
|
||||
this.hpoint = 0;
|
||||
this.gameRewardItems = [];
|
||||
this.gameResultRewardItem = null;
|
||||
this.palog = false;
|
||||
this.returnValue = "";
|
||||
this.keysArray = new Array();
|
||||
this.keysContentArray = new Array(); // an array of arrays - key is stored in keysArray
|
||||
this.counterKeys = 0;
|
||||
*/
|
||||
};
|
||||
var instanceProto = pluginProto.Instance.prototype;
|
||||
instanceProto.onCreate = function () {
|
||||
};
|
||||
instanceProto.onDestroy = function () {
|
||||
};
|
||||
instanceProto.saveToJSON = function () {
|
||||
return {
|
||||
};
|
||||
};
|
||||
instanceProto.loadFromJSON = function (o) {
|
||||
};
|
||||
instanceProto.draw = function (ctx) {
|
||||
};
|
||||
instanceProto.drawGL = function (glw) {
|
||||
};
|
||||
function Cnds() {
|
||||
};
|
||||
Cnds.prototype.OnComplete = function (tag) {
|
||||
return true;
|
||||
};
|
||||
Cnds.prototype.OnError = function (tag) {
|
||||
return cr.equals_nocase(tag, this.curTag);
|
||||
};
|
||||
Cnds.prototype.OnReplayRun = function (tag) {
|
||||
return true;
|
||||
}
|
||||
Cnds.prototype.MyCondition = function (myparam) {
|
||||
return myparam >= 0;
|
||||
};
|
||||
instanceProto.doForEachTrigger = function (current_event)
|
||||
{
|
||||
this.runtime.pushCopySol(current_event.solModifiers);
|
||||
current_event.retrigger();
|
||||
this.runtime.popSol(current_event.solModifiers);
|
||||
};
|
||||
Cnds.prototype.ForEachRewardItem = function () {
|
||||
var current_event = this.runtime.getCurrentEventStack().current_event;
|
||||
this.curLoopIndex = 0;
|
||||
for (this.curLoopIndex = 0; this.curLoopIndex < this.gameRewardItems.length; this.curLoopIndex++)
|
||||
{
|
||||
this.doForEachTrigger(current_event);
|
||||
}
|
||||
this.curLoopIndex = 0;
|
||||
return false;
|
||||
};
|
||||
pluginProto.cnds = new Cnds();
|
||||
function Acts() {
|
||||
};
|
||||
var onMessageReceived = false;
|
||||
Acts.prototype.BDOn = function (myparam) {
|
||||
if (typeof BLDATA != "undefined"){
|
||||
var BL_DATA = BLDATA['GETBLDATA'];
|
||||
this.ISLOADING = BL_DATA['ISLOADING'];
|
||||
}
|
||||
};
|
||||
Acts.prototype.BDConnectOn = function (myparam) {
|
||||
if (typeof BLDATA != "undefined"){
|
||||
var bdconnecton = BLDATA['CONNECTON'];
|
||||
bdconnecton();
|
||||
}
|
||||
};
|
||||
Acts.prototype.BDStart = function (myparam) {
|
||||
if (typeof BLDATA != "undefined"){
|
||||
var bdstart = BLDATA['START'];
|
||||
bdstart();
|
||||
}
|
||||
};
|
||||
Acts.prototype.BDFinish = function (myparam) {
|
||||
if (typeof BLDATA != "undefined"){
|
||||
var bdfinish = BLDATA['FINISH'];
|
||||
bdfinish();
|
||||
}
|
||||
};
|
||||
Acts.prototype.BDRanking = function (email,username,score,listcount) {
|
||||
if (typeof BLDATA != "undefined"){
|
||||
var bdranking = BLDATA['RANKING'];
|
||||
bdranking(email,username,score,listcount);
|
||||
}
|
||||
};
|
||||
Acts.prototype.BDSendScore = function (score,playtime) {
|
||||
if (typeof BLDATA != "undefined"){
|
||||
var bdsendscore = BLDATA['SENDSCORE'];
|
||||
bdsendscore(score,playtime);
|
||||
}
|
||||
};
|
||||
function getBL(){
|
||||
if (typeof BLDATA != "undefined"){
|
||||
return BLDATA['GETBLDATA'];
|
||||
}else
|
||||
return null;
|
||||
}
|
||||
pluginProto.acts = new Acts();
|
||||
function Exps() {
|
||||
};
|
||||
pluginProto.exps = {};
|
||||
var exps = pluginProto.exps;
|
||||
Exps.prototype.IsRankingLoaded = function (ret) {
|
||||
if(getBL() != null && getBL()['ISLOADING'] && typeof getBL()['ISRANKINGLOADED'] !== "undefined")
|
||||
{
|
||||
if(getBL()['ISRANKINGLOADED'])
|
||||
ret.set_string("1");
|
||||
else
|
||||
ret.set_string("0");
|
||||
}
|
||||
else
|
||||
ret.set_string("");
|
||||
};
|
||||
Exps.prototype.RankEmail = function (ret,rank) {
|
||||
console.log("ret "+ret);
|
||||
console.log("ret "+ret+" rank is "+rank);
|
||||
if(getBL() != null && getBL()['ISLOADING'] && typeof getBL()['RANKINGLIST'] !== "undefined" && getBL()['RANKINGLIST'][rank] !== "undefined")
|
||||
ret.set_string(getBL()['RANKINGLIST'][rank]['reg_value1']+"");
|
||||
else
|
||||
ret.set_string("");
|
||||
};
|
||||
Exps.prototype.RankScore = function (ret,rank) {
|
||||
console.log("ret "+ret+" rank is "+rank);
|
||||
if(getBL() != null && getBL()['ISLOADING'] && typeof getBL()['RANKINGLIST'] !== "undefined" && getBL()['RANKINGLIST'][rank] !== "undefined")
|
||||
ret.set_string(getBL()['RANKINGLIST'][rank]['max_score']+"");
|
||||
else
|
||||
ret.set_string("");
|
||||
};
|
||||
Exps.prototype.MyRank = function (ret) {
|
||||
if(getBL() != null && getBL()['ISLOADING'] && typeof getBL()['MYRANKING'] !== "undefined")
|
||||
ret.set_string(getBL()['MYRANKING']['ranking']+"");
|
||||
else
|
||||
ret.set_string("");
|
||||
};
|
||||
Exps.prototype.MyScore = function (ret) {
|
||||
if(getBL() != null && getBL()['ISLOADING'] && typeof getBL()['MYRANKING'] !== "undefined")
|
||||
ret.set_string(getBL()['MYRANKING']['max_score']+"");
|
||||
else
|
||||
ret.set_string("");
|
||||
};
|
||||
Exps.prototype.RankCount = function (ret) {
|
||||
if(getBL() != null && getBL()['ISLOADING'] && typeof getBL()['RANKINGLIST'] !== "undefined")
|
||||
ret.set_int(getBL()['RANKINGLIST'].length);
|
||||
else
|
||||
ret.set_int(0);
|
||||
};
|
||||
Exps.prototype.EmailCheck = function (ret,email) {
|
||||
var regex=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
|
||||
if(regex.test(email) === false)
|
||||
ret.set_int(0);
|
||||
else
|
||||
ret.set_int(1);
|
||||
};
|
||||
Exps.prototype.SecureEmail = function (ret,email) {
|
||||
var secure_email = email;
|
||||
if(email.length > 3)
|
||||
var secure_email = "***"+email.substring(3);
|
||||
ret.set_string(secure_email);
|
||||
};
|
||||
Exps.prototype.LowVersion = function (ret) {
|
||||
var errormessage = "";
|
||||
var ua = navigator.userAgent;
|
||||
if( ua.indexOf("Android") >= 0 )
|
||||
{
|
||||
var androidversion = parseFloat(ua.slice(ua.indexOf("Android")+8));
|
||||
if(androidversion < 4.4){
|
||||
errormessage=""+androidversion;
|
||||
}
|
||||
}
|
||||
if(errormessage.length > 0){
|
||||
ret.set_string(errormessage);
|
||||
}
|
||||
else
|
||||
ret.set_string("");
|
||||
};
|
||||
Exps.prototype.SupportWebsocket = function (ret) {
|
||||
console.log("SupportWebsocket!!!");
|
||||
if (window.WebSocket){
|
||||
ret.set_string("true");
|
||||
} else {
|
||||
ret.set_string("false");
|
||||
}
|
||||
};
|
||||
Exps.prototype.MyExpression = function (ret) // 'ret' must always be the first parameter - always return the expression's result through it!
|
||||
{
|
||||
ret.set_int(1337); // return our value
|
||||
};
|
||||
pluginProto.exps = new Exps();
|
||||
}());
|
||||
;
|
||||
;
|
||||
cr.behaviors.Anchor = function(runtime)
|
||||
{
|
||||
this.runtime = runtime;
|
||||
@@ -26238,14 +26017,13 @@ cr.behaviors.lunarray_Tween = function(runtime)
|
||||
};
|
||||
}());
|
||||
cr.getObjectRefTable = function () { return [
|
||||
cr.plugins_.Sprite,
|
||||
cr.plugins_.SenaPlugin,
|
||||
cr.plugins_.Touch,
|
||||
cr.plugins_.Text,
|
||||
cr.plugins_.Audio,
|
||||
cr.plugins_.Browser,
|
||||
cr.plugins_.Function,
|
||||
cr.plugins_.remoteplugin,
|
||||
cr.plugins_.SenaPlugin,
|
||||
cr.plugins_.Sprite,
|
||||
cr.plugins_.Text,
|
||||
cr.plugins_.Touch,
|
||||
cr.behaviors.Rex_MoveTo,
|
||||
cr.behaviors.Fade,
|
||||
cr.behaviors.DragnDrop,
|
||||
@@ -26274,22 +26052,25 @@ cr.getObjectRefTable = function () { return [
|
||||
cr.plugins_.Function.prototype.acts.CallFunction,
|
||||
cr.system_object.prototype.acts.SetVar,
|
||||
cr.plugins_.SenaPlugin.prototype.exps.getOptionsCount,
|
||||
cr.system_object.prototype.cnds.Compare,
|
||||
cr.plugins_.Function.prototype.cnds.OnFunction,
|
||||
cr.plugins_.SenaPlugin.prototype.exps.getHintValue,
|
||||
cr.system_object.prototype.exps.max,
|
||||
cr.plugins_.SenaPlugin.prototype.exps.getHintCount,
|
||||
cr.plugins_.Text.prototype.acts.Destroy,
|
||||
cr.plugins_.Sprite.prototype.acts.Destroy,
|
||||
cr.plugins_.SenaPlugin.prototype.acts.CalcObjectPositions,
|
||||
cr.plugins_.SenaPlugin.prototype.exps.getHintCount,
|
||||
cr.system_object.prototype.exps.layoutwidth,
|
||||
cr.system_object.prototype.cnds.Repeat,
|
||||
cr.system_object.prototype.cnds.Compare,
|
||||
cr.plugins_.SenaPlugin.prototype.exps.getHintValue,
|
||||
cr.system_object.prototype.exps.loopindex,
|
||||
cr.system_object.prototype.acts.CreateObject,
|
||||
cr.plugins_.Sprite.prototype.acts.SetX,
|
||||
cr.plugins_.SenaPlugin.prototype.exps.getPosXbyIndex,
|
||||
cr.plugins_.Sprite.prototype.acts.SetY,
|
||||
cr.plugins_.SenaPlugin.prototype.exps.getPosYbyIndex,
|
||||
cr.plugins_.Sprite.prototype.acts.SetAnimFrame,
|
||||
cr.plugins_.Sprite.prototype.acts.SetScale,
|
||||
cr.plugins_.Sprite.prototype.acts.SetWidth,
|
||||
cr.plugins_.Sprite.prototype.acts.SetHeight,
|
||||
cr.plugins_.Sprite.prototype.exps.X,
|
||||
cr.plugins_.Sprite.prototype.exps.Y,
|
||||
cr.plugins_.Text.prototype.acts.SetText,
|
||||
@@ -26308,9 +26089,6 @@ cr.getObjectRefTable = function () { return [
|
||||
cr.plugins_.Sprite.prototype.cnds.IsOverlapping,
|
||||
cr.behaviors.DragnDrop.prototype.cnds.OnDrop,
|
||||
cr.plugins_.Sprite.prototype.acts.SetPos,
|
||||
cr.plugins_.Sprite.prototype.acts.SetWidth,
|
||||
cr.plugins_.Sprite.prototype.acts.SetHeight,
|
||||
cr.behaviors.Rex_MoveTo.prototype.acts.SetTargetPos,
|
||||
cr.system_object.prototype.cnds.ForEach,
|
||||
cr.system_object.prototype.cnds.CompareVar,
|
||||
cr.plugins_.Sprite.prototype.exps.Count,
|
||||
@@ -26325,7 +26103,6 @@ cr.getObjectRefTable = function () { return [
|
||||
cr.plugins_.SenaPlugin.prototype.cnds.OnCorrect,
|
||||
cr.plugins_.SenaPlugin.prototype.cnds.OnWrong,
|
||||
cr.system_object.prototype.cnds.EveryTick,
|
||||
cr.system_object.prototype.exps.max,
|
||||
cr.plugins_.SenaPlugin.prototype.exps.getTimeLimit,
|
||||
cr.plugins_.SenaPlugin.prototype.exps.getElapsedTime,
|
||||
cr.system_object.prototype.exps["int"],
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 11 KiB |
@@ -81,7 +81,7 @@
|
||||
|
||||
<!-- Construct 2 exported games require jQuery. -->
|
||||
<script src="jquery-3.4.1.min.js"></script>
|
||||
<script src="tdv_sdk.js"></script>
|
||||
|
||||
<script src="sena_sdk.js"></script>
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": 1772002603,
|
||||
"version": 1772102471,
|
||||
"fileList": [
|
||||
"data.js",
|
||||
"c2runtime.js",
|
||||
@@ -9,52 +9,27 @@
|
||||
"images/slot-sheet0.png",
|
||||
"images/submit-sheet0.png",
|
||||
"images/sprite-sheet0.png",
|
||||
"images/sena_ui_frame_intro-sheet0.png",
|
||||
"images/wrong-sheet0.png",
|
||||
"images/correct-sheet0.png",
|
||||
"images/setting-sheet0.png",
|
||||
"images/khung_score-sheet0.png",
|
||||
"images/khung_timer-sheet0.png",
|
||||
"images/pause-sheet0.png",
|
||||
"images/pause-sheet1.png",
|
||||
"images/help-sheet0.png",
|
||||
"images/board-sheet0.png",
|
||||
"images/bgm-sheet0.png",
|
||||
"images/bgm-sheet1.png",
|
||||
"images/pauseicon-sheet0.png",
|
||||
"images/black-sheet0.png",
|
||||
"images/hint-sheet0.png",
|
||||
"images/imageframe-sheet0.png",
|
||||
"images/sound_question-sheet0.png",
|
||||
"images/newwords-sheet0.png",
|
||||
"media/bg.m4a",
|
||||
"media/bg.ogg",
|
||||
"media/click.m4a",
|
||||
"media/click.ogg",
|
||||
"media/correct.m4a",
|
||||
"media/correct.ogg",
|
||||
"media/fail.m4a",
|
||||
"media/fail.ogg",
|
||||
"media/alert-234711.ogg",
|
||||
"media/bubble-pop-389501.ogg",
|
||||
"media/button-124476.ogg",
|
||||
"media/click-234708.ogg",
|
||||
"media/collect-5930.ogg",
|
||||
"media/edugamery-music-13.ogg",
|
||||
"media/error-010-206498.ogg",
|
||||
"media/error-08-206492.ogg",
|
||||
"media/fail-234710.ogg",
|
||||
"media/interface-2-126517.ogg",
|
||||
"media/material-buy-success-394517.ogg",
|
||||
"media/pick-92276.ogg",
|
||||
"media/pop-reverb-423718.ogg",
|
||||
"media/retro-explode-1-236678.ogg",
|
||||
"media/sample_input_typing01_kofi_by_miraclei-363634.ogg",
|
||||
"media/edugamery-music-18.ogg",
|
||||
"media/edugamery-music-20.ogg",
|
||||
"media/edugamery-music-5.ogg",
|
||||
"media/edugamery-music-6.ogg",
|
||||
"media/fm-freemusic-give-me-a-smile(chosic.com).ogg",
|
||||
"media/card_drag.ogg",
|
||||
"media/card_flips.ogg",
|
||||
"media/card_swipe.ogg",
|
||||
@@ -65,7 +40,6 @@
|
||||
"icon-256.png",
|
||||
"loading-logo.png",
|
||||
"bg.mp4",
|
||||
"tdv_sdk.js",
|
||||
"sena_sdk.js"
|
||||
]
|
||||
}
|
||||
@@ -333,7 +333,7 @@ SenaSDK.prototype.getTotalQuestions = function () {
|
||||
};
|
||||
|
||||
// Settings cho postMessage waiting
|
||||
SenaSDK.prototype.POSTMESSAGE_TIMEOUT_MS = 3000; // 5 giây (chỉ dùng cho preview mode)
|
||||
SenaSDK.prototype.POSTMESSAGE_TIMEOUT_MS = 1000; // 5 giây (chỉ dùng cho preview mode)
|
||||
|
||||
SenaSDK.prototype.load = function (callback, template = "G2510S1T30") {
|
||||
let self = this;
|
||||
|
||||
Binary file not shown.
BIN
source/SQ_Word_Hint-Audio.capx.backup1
Normal file
BIN
source/SQ_Word_Hint-Audio.capx.backup1
Normal file
Binary file not shown.
Reference in New Issue
Block a user