2ccb48bb-4a3c-4d8b-901c-25cddf56e0d6.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. "use strict";
  2. cc._RF.push(module, '2ccb4i7SjxNi5AcJc3fVuDW', 'CheckIsShowIcon');
  3. // common-plugin/Scripts/CheckIsShowIcon.ts
  4. "use strict";
  5. // Learn TypeScript:
  6. // - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/typescript.html
  7. // - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/typescript.html
  8. // Learn Attribute:
  9. // - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
  10. // - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/reference/attributes.html
  11. // Learn life-cycle callbacks:
  12. // - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
  13. // - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html
  14. var __extends = (this && this.__extends) || (function () {
  15. var extendStatics = function (d, b) {
  16. extendStatics = Object.setPrototypeOf ||
  17. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  18. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  19. return extendStatics(d, b);
  20. };
  21. return function (d, b) {
  22. extendStatics(d, b);
  23. function __() { this.constructor = d; }
  24. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  25. };
  26. })();
  27. var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  28. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  29. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  30. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  31. return c > 3 && r && Object.defineProperty(target, key, r), r;
  32. };
  33. Object.defineProperty(exports, "__esModule", { value: true });
  34. var Utils_1 = require("./Utils");
  35. var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
  36. var CheckIsShowIcon = /** @class */ (function (_super) {
  37. __extends(CheckIsShowIcon, _super);
  38. function CheckIsShowIcon() {
  39. return _super !== null && _super.apply(this, arguments) || this;
  40. }
  41. CheckIsShowIcon.prototype.onEnable = function () {
  42. if (Utils_1.utils.ServerConfig && Utils_1.utils.ServerConfig.show_video_icon && Utils_1.utils.ServerConfig.show_video_icon == "false") {
  43. this.node.active = false;
  44. }
  45. else {
  46. this.node.active = true;
  47. }
  48. };
  49. CheckIsShowIcon = __decorate([
  50. ccclass
  51. ], CheckIsShowIcon);
  52. return CheckIsShowIcon;
  53. }(cc.Component));
  54. exports.default = CheckIsShowIcon;
  55. cc._RF.pop();