Customer.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. var t = require;
  2. var e = module;
  3. var i = exports;
  4. e =
  5. (this && this.__decorate) ||
  6. function (t, e, i, s) {
  7. var o,
  8. a = arguments.length,
  9. n = a < 3 ? e : null === s ? (s = Object.getOwnPropertyDescriptor(e, i)) : s;
  10. if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(t, e, i, s);
  11. else
  12. for (var r = t.length - 1; 0 <= r; r--)
  13. (o = t[r]) && (n = (a < 3 ? o(n) : 3 < a ? o(e, i, n) : o(e, i)) || n);
  14. return 3 < a && n && Object.defineProperty(e, i, n), n;
  15. };
  16. Object.defineProperty(i, "__esModule", {value: !0});
  17. const s = t("App"),
  18. o = t("GameConst"),
  19. a = t("GlobalAttr"),
  20. n = t("RoleService"),
  21. r = t("BaseMan"),
  22. {ccclass: l} = cc._decorator;
  23. e = e(
  24. [l],
  25. (e = class extends r.default {
  26. constructor() {
  27. super(...arguments), (this.isSit = !1), (this.posData = null), (this.isEixt = !1), (this.order = null);
  28. }
  29. onLoad() {
  30. this.calSpeed();
  31. }
  32. sitDown() {
  33. (this.state = r.CharactorState.sitdown), (this.direction = this.posData.sit.direction);
  34. }
  35. calSpeed() {
  36. this.moveSpeed = a.default.ins.customerMoveSpeed;
  37. }
  38. exit(t) {
  39. (this.state = r.CharactorState.stand),
  40. (this.isEixt = !0),
  41. this.talkCnt || n.default.ins.showLang(this.node, o.RoleLangType.COSTUMER_EXIT);
  42. }
  43. destroySelf() {
  44. this.node.destroy();
  45. }
  46. ranSkin() {
  47. var t = s.default.RandomUtils.limitInteger(1, 24);
  48. this.sp.setSkin("cat/Cat" + t);
  49. }
  50. })
  51. );
  52. i.default = e;