完善 docs

This commit is contained in:
SmallMain
2022-06-17 18:42:43 +08:00
parent a815401a2c
commit 142e19d075
45 changed files with 11534 additions and 149 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,54 @@
import { chars } from "../chars";
const { ccclass, property } = cc._decorator;
@ccclass
export default class CharMode extends cc.Component {
@property(cc.Label)
bitmapFont1: cc.Label = null;
@property(cc.Label)
bitmapFont2: cc.Label = null;
@property(cc.Label)
bitmapFont3: cc.Label = null;
@property(cc.Label)
charFont1: cc.Label = null;
@property(cc.Label)
charFont2: cc.Label = null;
@property(cc.Label)
charFont3: cc.Label = null;
protected onLoad(): void {
this.bitmapFont1.string = this.getRandomText(15);
this.bitmapFont2.string = this.getRandomText(15);
this.bitmapFont3.string = this.getRandomText(15);
this.charFont1.string = this.getRandomText(15);
this.charFont2.string = this.getRandomText(15);
this.charFont3.string = this.getRandomText(15);
this.schedule(() => {
this.bitmapFont1.string = this.getRandomText(15);
this.bitmapFont2.string = this.getRandomText(15);
this.bitmapFont3.string = this.getRandomText(15);
this.charFont1.string = this.getRandomText(15);
this.charFont2.string = this.getRandomText(15);
this.charFont3.string = this.getRandomText(15);
}, 0.1);
}
getRandomText(length: number) {
let str = '';
while (str.length < length) {
str += chars[Math.floor(Math.random() * chars.length)];
}
return str;
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.8",
"uuid": "59d30214-6082-40ab-96d5-2704f05b10b5",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}