mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-01-15 07:21:07 +00:00
137 lines
23 KiB
JavaScript
137 lines
23 KiB
JavaScript
|
window.__require = function e(t, n, r) {
|
||
|
function s(o, u) {
|
||
|
if (!n[o]) {
|
||
|
if (!t[o]) {
|
||
|
var b = o.split("/");
|
||
|
b = b[b.length - 1];
|
||
|
if (!t[b]) {
|
||
|
var a = "function" == typeof __require && __require;
|
||
|
if (!u && a) return a(b, !0);
|
||
|
if (i) return i(b, !0);
|
||
|
throw new Error("Cannot find module '" + o + "'");
|
||
|
}
|
||
|
o = b;
|
||
|
}
|
||
|
var f = n[o] = {
|
||
|
exports: {}
|
||
|
};
|
||
|
t[o][0].call(f.exports, function(e) {
|
||
|
var n = t[o][1][e];
|
||
|
return s(n || e);
|
||
|
}, f, f.exports, e, t, n, r);
|
||
|
}
|
||
|
return n[o].exports;
|
||
|
}
|
||
|
var i = "function" == typeof __require && __require;
|
||
|
for (var o = 0; o < r.length; o++) s(r[o]);
|
||
|
return s;
|
||
|
}({
|
||
|
"char-mode": [ function(require, module, exports) {
|
||
|
"use strict";
|
||
|
cc._RF.push(module, "59d30IUYIJAq5bVJwTwWxC1", "char-mode");
|
||
|
"use strict";
|
||
|
var __extends = this && this.__extends || function() {
|
||
|
var extendStatics = function(d, b) {
|
||
|
extendStatics = Object.setPrototypeOf || {
|
||
|
__proto__: []
|
||
|
} instanceof Array && function(d, b) {
|
||
|
d.__proto__ = b;
|
||
|
} || function(d, b) {
|
||
|
for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
|
||
|
};
|
||
|
return extendStatics(d, b);
|
||
|
};
|
||
|
return function(d, b) {
|
||
|
extendStatics(d, b);
|
||
|
function __() {
|
||
|
this.constructor = d;
|
||
|
}
|
||
|
d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
|
};
|
||
|
}();
|
||
|
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
|
||
|
var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||
|
if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
||
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||
|
};
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
var chars_1 = require("../chars");
|
||
|
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
|
||
|
var CharMode = function(_super) {
|
||
|
__extends(CharMode, _super);
|
||
|
function CharMode() {
|
||
|
var _this = null !== _super && _super.apply(this, arguments) || this;
|
||
|
_this.bitmapFont1 = null;
|
||
|
_this.bitmapFont2 = null;
|
||
|
_this.bitmapFont3 = null;
|
||
|
_this.bitmapFont4 = null;
|
||
|
_this.charFont1 = null;
|
||
|
_this.charFont2 = null;
|
||
|
_this.charFont3 = null;
|
||
|
_this.charFont4 = null;
|
||
|
_this.enChars = "abcdefghijklmnopqrstuvwxyz.,/ 1234567890!@#$%^&*()-=_+`~,./;'<>?;[]{}|";
|
||
|
return _this;
|
||
|
}
|
||
|
CharMode.prototype.onLoad = function() {
|
||
|
var _this = this;
|
||
|
this.bitmapFont1.string = this.getRandomText(15);
|
||
|
this.bitmapFont2.string = this.getRandomText(15);
|
||
|
this.bitmapFont3.string = this.getRandomText(15);
|
||
|
this.bitmapFont4.string = this.getRandomTextEnglish(30);
|
||
|
this.charFont1.string = this.getRandomText(15);
|
||
|
this.charFont2.string = this.getRandomText(15);
|
||
|
this.charFont3.string = this.getRandomText(15);
|
||
|
this.charFont4.string = this.getRandomTextEnglish(30);
|
||
|
this.schedule(function() {
|
||
|
_this.bitmapFont1.string = _this.getRandomText(15);
|
||
|
_this.bitmapFont2.string = _this.getRandomText(15);
|
||
|
_this.bitmapFont3.string = _this.getRandomText(15);
|
||
|
_this.bitmapFont4.string = _this.getRandomTextEnglish(30);
|
||
|
_this.charFont1.string = _this.getRandomText(15);
|
||
|
_this.charFont2.string = _this.getRandomText(15);
|
||
|
_this.charFont3.string = _this.getRandomText(15);
|
||
|
_this.charFont4.string = _this.getRandomTextEnglish(30);
|
||
|
}, .1);
|
||
|
};
|
||
|
CharMode.prototype.getRandomText = function(length) {
|
||
|
var str = "";
|
||
|
while (str.length < length) str += chars_1.chars[Math.floor(Math.random() * chars_1.chars.length)];
|
||
|
return str;
|
||
|
};
|
||
|
CharMode.prototype.getRandomTextEnglish = function(length) {
|
||
|
var str = "";
|
||
|
while (str.length < length) str += this.enChars[Math.floor(Math.random() * this.enChars.length)];
|
||
|
return str;
|
||
|
};
|
||
|
__decorate([ property(cc.Label) ], CharMode.prototype, "bitmapFont1", void 0);
|
||
|
__decorate([ property(cc.Label) ], CharMode.prototype, "bitmapFont2", void 0);
|
||
|
__decorate([ property(cc.Label) ], CharMode.prototype, "bitmapFont3", void 0);
|
||
|
__decorate([ property(cc.Label) ], CharMode.prototype, "bitmapFont4", void 0);
|
||
|
__decorate([ property(cc.Label) ], CharMode.prototype, "charFont1", void 0);
|
||
|
__decorate([ property(cc.Label) ], CharMode.prototype, "charFont2", void 0);
|
||
|
__decorate([ property(cc.Label) ], CharMode.prototype, "charFont3", void 0);
|
||
|
__decorate([ property(cc.Label) ], CharMode.prototype, "charFont4", void 0);
|
||
|
CharMode = __decorate([ ccclass ], CharMode);
|
||
|
return CharMode;
|
||
|
}(cc.Component);
|
||
|
exports.default = CharMode;
|
||
|
cc._RF.pop();
|
||
|
}, {
|
||
|
"../chars": "chars"
|
||
|
} ],
|
||
|
chars: [ function(require, module, exports) {
|
||
|
"use strict";
|
||
|
cc._RF.push(module, "0f373c9jcRAy6NDXndhSRxT", "chars");
|
||
|
"use strict";
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
exports.chars = void 0;
|
||
|
exports.chars = "\u7684\u4e00\u662f\u5728\u4e86\u4e0d\u548c\u6709\u5927\u8fd9\u4e3b\u4e2d\u4eba\u4e0a\u4e3a\u4eec\u5730\u4e2a\u7528\u5de5\u65f6\u8981\u52a8\u56fd\u4ea7\u4ee5\u6211\u5230\u4ed6\u4f1a\u4f5c\u6765\u5206\u751f\u5bf9\u4e8e\u5b66\u4e0b\u7ea7\u5c31\u5e74\u9636\u4e49\u53d1\u6210\u90e8\u6c11\u53ef\u51fa\u80fd\u65b9\u8fdb\u540c\u884c\u9762\u8bf4\u79cd\u8fc7\u547d\u5ea6\u9769\u800c\u591a\u5b50\u540e\u81ea\u793e\u52a0\u5c0f\u673a\u4e5f\u7ecf\u529b\u7ebf\u672c\u7535\u9ad8\u91cf\u957f\u515a\u5f97\u5b9e\u5bb6\u5b9a\u6df1\u6cd5\u8868\u7740\u6c34\u7406\u5316\u4e89\u73b0\u6240\u4e8c\u8d77\u653f\u4e09\u597d\u5341\u6218\u65e0\u519c\u4f7f\u6027\u524d\u7b49\u53cd\u4f53\u5408\u6597\u8def\u56fe\u628a\u7ed3\u7b2c\u91cc\u6b63\u65b0\u5f00\u8bba\u4e4b\u7269\u4ece\u5f53\u4e24\u4e9b\u8fd8\u5929\u8d44\u4e8b\u961f\u6279\u5982\u5e94\u5f62\u60f3\u5236\u5fc3\u6837\u5e72\u90fd\u5411\u53d8\u5173\u70b9\u80b2\u91cd\u5176\u601d\u4e0e\u95f4\u5185\u53bb\u56e0\u4ef6\u65e5\u5229\u76f8\u7531\u538b\u5458\u6c14\u4e1a\u4ee3\u5168\u7ec4\u6570\u679c\u671f\u5bfc\u5e73\u5404\u57fa\u6216\u6708\u6bdb\u7136\u95ee\u6bd4\u5c55\u90a3\u5b83\u6700\u53ca\u5916\u6ca1\u770b\u6cbb\u63d0\u4e94\u89e3\u7cfb\u6797\u8005\u7c73\u7fa4\u5934\u610f\u53ea\u660e\u56db\u9053\u9a6c\u8ba4\u6b21\u6587\u901a\u4f46\u6761\u8f83\u514b\u53c8\u516c\u5b54\u9886\u519b\u6d41\u5165\u63a5\u5e2d\u4f4d\u60c5\u8fd0\u5668\u5e76\u98de\u539f\u6cb9\u653e\u7acb\u9898\u8d28\u6307\u5efa\u533a\u9a8c\u6d3b\u4f17\u5f88\u6559\u51b3\u7279\u6b64\u5e38\u77f3\u5f3a\u6781\u571f\u5c11\u5df2\u6839\u5171\u76f4\u56e2\u7edf\u5f0f\u8f6c\u522b\u9020\u5207\u4e5d\u4f60\u53d6\u897f\u6301\u603b\u6599\u8fde\u4efb\u5fd7\u89c2\u8c03\u4e03\u4e48\u5c71\u7a0b\u767e\u62a5\u66f4\u89c1\u5fc5\u771f\u4fdd\u70ed\u59d4\u624b\u6539\u7ba1\u5904\u5df1\u5c06\u4fee\u652f\u8bc6\u75c5\u8c61\u51e0\u5148\u8001\u5149\u4e13\u4ec0\u516d\u578b\u5177\u793a\u590d\u5b89\u5e26\u6bcf\u4e1c\u589e\u5219\u5b8c\u98ce\u56de\u5357\u5e7f\u52b3\u8f6e\u79d1\u5317\u6253\u79ef\u8f66\u8ba1\u7ed9\u8282\u505a\u52a1\u88ab\u6574\u8054\u6b65\u7c7b\u96c6\u53f7\u5217\u6e29\u88c5\u5373\u6beb\u77e5\u8f74\u7814\u5355\u8272\u575a\u636e\u901f\u9632\u53f2\u62c9\u4e16\u8bbe\u8fbe\u5c14\u573a\u7ec7\u5386\u82b1\u53d7\u6c42\u4f20\u53e3\u65ad\u51b5\u91c7\u7cbe\u91d1\u754c\u54c1\u5224\u53c2\u5c42\u6b62\u8fb9\u6e05\u81f3\u4e07\u786e\u7a76\u4e66\u672f\u72b6\u5382\u987b\u79bb\u518d\u76ee\u6d77\u4ea4\u6743\u4e14\u513f\u9752\u624d\u8bc1\u4f4e\u8d8a\u9645\u516b\u8bd5\u89c4\u65af\u8fd1\u6ce8\u529e\u5e03\u95e8\u94c1\u9700\u8d70\u8bae\u53bf\u5175\u56fa\u9664\u822c\u5f15\u9f7f\u5343\u80dc\u7ec6\u5f71\u6d4e\u767d\u683c\u6548\u7f6e\u63a8\u7a7a\u914d\u5200\u53f6\u7387\u8ff0\u4eca\u9009\u517b\u5fb7\u8bdd\u67e5\u5dee\u534a\u654c\u59cb\u7247\u65bd\u54cd\u6536\u534e\u89c9\u5907\u540d\u7ea2\u7eed\u5747\u836f\u6807\u8bb0\u96be\u5b58\u6d4b\u58eb\u8eab\u7d27\u6db2\u6d3e\u51c6\u65a4\u89d2\u964d\u7ef4\u677f\u8bb8\u7834\u8ff0\u6280\u6d88\u5e95\u5e8a\u7530\u52bf\u7aef\u611f\u5f80\u795e\u4fbf\u8d3a\u6751\u6784\u7167\u5bb9\u975e\u641e\u4e9a\u78e8\u65cf\u706b\u6bb5\u7b97\u9002\u8bb2\u6309\u503c\u7f8e\u6001\u9ec4\u6613\u5f6a\u670d\u65e9\u73ed\u9ea6\u524a\u4fe1\u6392\u53f0\u58f0\u8be5\u51fb\u7d20\u5f20\u5bc6\u5bb3\u4faf\u8349\u4f55\u6811\u80a5\u7ee7\u53f3\u5c5e\u5e02\u4e25\u5f84\u87ba\u68c0\u5de6\u9875\u6297\u82cf\u663e\u82e6\u82f1\u5feb\u79f0\u574f\u79fb\u7ea6\u5df4\u6750\u7701\u9ed1\u6b66\u57f9\u8457\u6cb3\u5e1d\u4ec5\u9488\u600e\u690d\u4eac\u52a9\u5347\u738b\u773c\u5979\u6293\u542b\u82d7\u526f\u6742\u666e\u8c08\u56f4\u98df\u5c04\u6e90\u4f8b\u81f4\u9178\u65e7\u5374\u5145\u8db3\u77ed\u5212\u5242\u5ba3\u73af\u843d\u9996\u5c3a\u6ce2\u627f\u7c89\u8df5\u5e9c\u9c7c\u968f\u8003\u523b\u9760\u591f\u6ee1\u592b\u5931\u5305\u4f4f\u4fc3\u679d\u5c40\u83cc\u6746\u5468\u62a4\u5ca9\u5e08\u4e3e\u66f2\u6625\u5143\u8d85\u8d1f\u7802\u5c01\u6362\u592a\u6a21\u8d2b\u51cf\u9633\u626c\u6c5f\u6790\u4ea9\u6728\u8a00\u7403\u671d\u533b\u6821\u53e4\u5462\u7a3b\u5b8b\u542c\u552f\u8f93\u6ed1\u7ad9\u53e6\u536b\u5b57\u9f13\u521a\u5199\u5218\u5fae\u7565\u8303\u4f9b\u963f\u5757\u67d0\u529f\u5957\u53cb\u9650\u9879\u4f59\u5012\u5377\u521b\u5f8b
|
||
|
cc._RF.pop();
|
||
|
}, {} ]
|
||
|
}, {}, [ "char-mode", "chars" ]);
|
||
|
//# sourceMappingURL=index.js.map
|