This commit is contained in:
tothvillar
2026-07-09 15:04:14 +08:00
commit e896e2ead4
1180 changed files with 115132 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
cc.Class({
extends: cc.Component,
properties: {
label_hintText: {
default: null,
type: cc.Label,
displayName: "提示文本"
}
},
onLoad: function () {},
start: function () {},
init: function () {},
onShowHintText: function (e, o) {
this.funCall = o || null;
this.label_hintText.string = e;
this.node.active = true;
cc.global.Source.onPlayBtnEffect("buttonClick");
},
typingAni: function (e, o, t) {
if (this.work) {
this.work = true;
this.unschedule(this.func, this);
} else {
this.work = true;
}
var i = "";
var n = o.split("");
var a = n.length;
var c = 0;
this.func = function () {
i += n[c];
e.string = i;
if (++c == a) {
this.unschedule(this.func, this);
t && t();
this.work = false;
}
cc.global.Source.onPlayGameEffect("typewriting");
}.bind(this);
this.schedule(this.func, .08, cc.macro.REPEAT_FOREVER, 0);
},
onCloseUI: function () {
this.funCall && this.funCall();
this.node.active = false;
cc.global.Source.onPlayBtnEffect("buttonClick");
}
});