(function() {
var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
var __module = nodeEnv ? module : {exports:{}};
var __filename = 'preview-scripts/__qc_index__.js';
var __require = nodeEnv ? function (request) {
return cc.require(request);
} : function (request) {
return __quick_compile_project__.require(request, __filename);
};
function __define (exports, require, module) {
if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}
require('./assets/migration/use_v2.1-2.2.1_cc.Toggle_event');
require('./assets/src/Attendance');
require('./assets/src/AttendancePrefab');
require('./assets/src/Audio');
require('./assets/src/ContinueLayer');
require('./assets/src/Fail');
require('./assets/src/G');
require('./assets/src/Game');
require('./assets/src/GameHome');
require('./assets/src/GoIn');
require('./assets/src/Gold');
require('./assets/src/GoldAnim');
require('./assets/src/GoldAnimationLayer');
require('./assets/src/GuessYouLike');
require('./assets/src/GuideLayer');
require('./assets/src/Interface');
require('./assets/src/InviteFriends');
require('./assets/src/Load');
require('./assets/src/LocalStorage');
require('./assets/src/MatrixCtrl');
require('./assets/src/MtilsJS');
require('./assets/src/ObtainLayer');
require('./assets/src/OverLayer');
require('./assets/src/RollingImg');
require('./assets/src/Score');
require('./assets/src/SelectColorLayer');
require('./assets/src/Server');
require('./assets/src/ShareEvent');
require('./assets/src/Star');
require('./assets/src/StarParticle');
require('./assets/src/Utils');
require('./assets/src/WeChat');
require('./assets/src/WeChatFileSystemManager');
require('./assets/src/Win');
require('./assets/src/addProgram');
require('./assets/src/exported-Button');
require('./assets/src/exported-GameBox');
require('./assets/src/exported-GameBoxInterface');
require('./assets/src/exported-Icon');
require('./assets/src/gameData');
require('./assets/src/isSupportRank');
require('./assets/src/psconfig');
require('./assets/src/websocketJS');
require('./assets/src/wsToolsJS');
require('./assets/src/wx');
}
if (nodeEnv) {
__define(__module.exports, __require, __module);
}
else {
__quick_compile_project__.registerModuleFunc(__filename, function () {
__define(__module.exports, __require, __module);
});
}
})();
//------QC-SOURCE-SPLIT------
(function() {
var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
var __module = nodeEnv ? module : {exports:{}};
var __filename = 'preview-scripts/assets/src/Attendance.js';
var __require = nodeEnv ? function (request) {
return cc.require(request);
} : function (request) {
return __quick_compile_project__.require(request, __filename);
};
function __define (exports, require, module) {
if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, 'e0f33JoGE9NVIYTJT6mhgR0', 'Attendance');
// src/Attendance.js
"use strict";
var o = require("G");
cc.Class({
"extends": cc.Component,
properties: {
attendancePrefab: cc.Prefab,
attendancePrefabScript: "",
content: cc.Node,
btn1: cc.Button,
btn2: cc.Button,
again: cc.Node,
againGold: cc.Label,
at: cc.Node,
shareLayer: cc.Node,
shareGold: cc.Label
},
onLoad: function onLoad() {
this.init();
},
onEnable: function onEnable() {
this.at.active = !0;
},
start: function start() {
var t = cc.winSize;
t.height / t.width >= 1.7 ? (console.log("大于 1.7"), o.Interface.showBannerAD()) : o.Interface.hideBannerAD();
var e = new Date(),
n = o.LocalStorage.getData();
e.toDateString() == n && (this.node.active = !1);
},
init: function init() {
var t = o.LocalStorage.getData(),
e = o.LocalStorage.get("dataTime"),
n = new Date();
console.log(t, n.toDateString(), e), t == n.toDateString() ? (this.btn1.interactable = !1, this.btn2.interactable = !1, 0 == (e %= 7) && (e = 7)) : e = e % 7 + 1;
for (var i = 1; i <= 7; i++) {
var a = cc.instantiate(this.attendancePrefab);
a.getComponent(this.attendancePrefabScript).init({
id: i
}), e > i && a.getComponent(this.attendancePrefabScript).lost(), t == n.toDateString() ? e == i && a.getComponent(this.attendancePrefabScript).lost() : e == i && (this.dataNode = a, a.getComponent(this.attendancePrefabScript).now()), a.parent = this.content;
}
},
get: function get() {
this.getGold(1);
},
get2: function get2() {
o.Interface.showRewardedAD(function () {
this.getGold(2);
}.bind(this));
},
getGold: function getGold(t) {
if (cc.director.emit("clickSound"), console.log("11111"), this.dataNode) {
this.dataNode.getComponent(this.attendancePrefabScript).lost();
var e = o.LocalStorage.get("gold");
o.LocalStorage.set("gold", e + this.dataNode.getComponent(this.attendancePrefabScript).gold * t), this.initShare(this.dataNode.getComponent(this.attendancePrefabScript).gold * t), cc.director.emit("gold");
}
var n = new Date();
o.LocalStorage.setData(n.toDateString());
var i = o.LocalStorage.get("dataTime");
i++, o.LocalStorage.set("dataTime", i), this.btn1.interactable = !1, this.btn2.interactable = !1;
},
clear: function clear() {
o.LocalStorage.setData(0);
},
close: function close() {
this.node.active = !1;
},
uptime: function uptime() {
o.LocalStorage.setData(0);
},
initShare: function initShare(t) {
this.shareLayer.active = !0, this.at.active = !1, this.shareGold.string = "x" + t;
},
share: function share() {
o.Interface.share(), this.scheduleOnce(function () {
this.shareLayer.active = !1, this.initAgain(this.dataNode.getComponent(this.attendancePrefabScript).gold);
}, .3);
},
closeShare: function closeShare() {
this.shareLayer.active = !1, this.initAgain(this.dataNode.getComponent(this.attendancePrefabScript).gold);
},
initAgain: function initAgain(t) {
this.again.active = !0, this.againGold.string = "x" + t, this.aGold = t;
},
againBtn: function againBtn() {
o.Interface.showRewardedAD(function () {
var t = o.LocalStorage.get("gold");
o.LocalStorage.set("gold", t + this.aGold), cc.director.emit("gold"), this.closeAgainBtn();
}.bind(this));
},
closeAgainBtn: function closeAgainBtn() {
this.again.active = !1, this.node.active = !1;
}
});
cc._RF.pop();
}
if (nodeEnv) {
__define(__module.exports, __require, __module);
}
else {
__quick_compile_project__.registerModuleFunc(__filename, function () {
__define(__module.exports, __require, __module);
});
}
})();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0cy9zcmMvQXR0ZW5kYW5jZS5qcyJdLCJuYW1lcyI6WyJvIiwicmVxdWlyZSIsImNjIiwiQ2xhc3MiLCJDb21wb25lbnQiLCJwcm9wZXJ0aWVzIiwiYXR0ZW5kYW5jZVByZWZhYiIsIlByZWZhYiIsImF0dGVuZGFuY2VQcmVmYWJTY3JpcHQiLCJjb250ZW50IiwiTm9kZSIsImJ0bjEiLCJCdXR0b24iLCJidG4yIiwiYWdhaW4iLCJhZ2FpbkdvbGQiLCJMYWJlbCIsImF0Iiwic2hhcmVMYXllciIsInNoYXJlR29sZCIsIm9uTG9hZCIsImluaXQiLCJvbkVuYWJsZSIsImFjdGl2ZSIsInN0YXJ0IiwidCIsInd
评论0