d5262b1c-cfb2-4837-95d3-7ad6651cbf7e.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. "use strict";
  2. cc._RF.push(module, 'd5262scz7JIN5XTetZlHL9+', 'hallSceneMediator');
  3. // Script/hallSceneMediator.ts
  4. "use strict";
  5. var __extends = (this && this.__extends) || (function () {
  6. var extendStatics = function (d, b) {
  7. extendStatics = Object.setPrototypeOf ||
  8. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  9. function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
  10. return extendStatics(d, b);
  11. };
  12. return function (d, b) {
  13. extendStatics(d, b);
  14. function __() { this.constructor = d; }
  15. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  16. };
  17. })();
  18. Object.defineProperty(exports, "__esModule", { value: true });
  19. var BaseMediator_1 = require("../lightMVC/core/base/BaseMediator");
  20. var ViewManager_1 = require("../lightMVC/core/manager/ViewManager");
  21. var hallSceneMediator = /** @class */ (function (_super) {
  22. __extends(hallSceneMediator, _super);
  23. function hallSceneMediator() {
  24. return _super !== null && _super.apply(this, arguments) || this;
  25. }
  26. hallSceneMediator.prototype.init = function (data) {
  27. var _this = this;
  28. //将mediator添加到了layer数组中
  29. ViewManager_1.ViewManager.getInstance().pushLayerList(this);
  30. this.registerNoti("UPDATE_TILI", function () {
  31. console.log('UPDATE_TILI**************');
  32. _this.view.ShowPhysicalValue();
  33. }, this);
  34. this.registerNoti("UPDATE_COIN", function () {
  35. console.log('UPDATE_TILI**************');
  36. _this.view.ShowUserCoinValue();
  37. }, this);
  38. this.registerNoti("UPDATE_DIAMOND", function () {
  39. console.log('UPDATE_DIAMOND**************');
  40. _this.view.ShowUserDiamondValue();
  41. }, this);
  42. this.registerNoti("UPDATE_TILI_JISHI", function (data) {
  43. _this.view.TiliCountShow(data);
  44. }, this);
  45. };
  46. hallSceneMediator.prototype.viewDidAppear = function () {
  47. };
  48. hallSceneMediator.prototype.destroy = function () {
  49. };
  50. return hallSceneMediator;
  51. }(BaseMediator_1.default));
  52. exports.default = hallSceneMediator;
  53. cc._RF.pop();