1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- var t = require;
- var e = module;
- var i = exports;
- e =
- (this && this.__decorate) ||
- function (t, e, i, s) {
- var o,
- a = arguments.length,
- n = a < 3 ? e : null === s ? (s = Object.getOwnPropertyDescriptor(e, i)) : s;
- if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(t, e, i, s);
- else
- for (var r = t.length - 1; 0 <= r; r--)
- (o = t[r]) && (n = (a < 3 ? o(n) : 3 < a ? o(e, i, n) : o(e, i)) || n);
- return 3 < a && n && Object.defineProperty(e, i, n), n;
- };
- Object.defineProperty(i, "__esModule", {value: !0}), (i.RoleSpeakComponent = void 0);
- const s = t("App"),
- o = t("RoleService"),
- {ccclass: a, property: n} = cc._decorator;
- t = class extends cc.Component {
- constructor() {
- super(...arguments), (this.langLab = null), (this.followNode = null), (this.talkTime = 3);
- }
- init(t, e) {
- (this.followNode = t),
- (this.langLab.string = e),
- (this.talkTime = 3),
- this.followNode
- ? ((this.node.x = this.followNode.x), (this.node.y = this.followNode.y + this.followNode.height + 30))
- : (o.default.ins.talkingFinish(),
- s.default.NodePoolMsr.roleLangPool.push(this.node),
- (this.followNode = null));
- }
- update(t) {
- (this.talkTime -= t),
- this.talkTime < 0 || !this.followNode || !this.followNode.active
- ? s.default.NodePoolMsr.roleLangPool.push(this.node)
- : ((this.node.x = this.followNode.x), (this.node.y = this.followNode.y + this.followNode.height + 30));
- }
- onDisable() {
- o.default.ins.talkingFinish(), (this.followNode = null);
- }
- };
- e([n(cc.Label)], t.prototype, "langLab", void 0), (t = e([a], t)), (i.RoleSpeakComponent = t);
|