NGASpecialAction.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. var t = require;
  2. var e = module;
  3. var i = exports;
  4. Object.defineProperty(i, "__esModule", {value: !0});
  5. const s = t("App"),
  6. o = t("ControllerConst"),
  7. a = t("B3Tree1");
  8. class n extends a.BaseAction {
  9. parseParam(t) {
  10. let e = t.split("|"),
  11. i = [];
  12. for (const s of e)
  13. "i" === s[0]
  14. ? i.push(parseInt(s.slice(1)))
  15. : "f" === s[0]
  16. ? i.push(parseFloat(s.slice(1)))
  17. : i.push(s.slice(1));
  18. return i;
  19. }
  20. open(t) {
  21. "string" == typeof this.properties.controller &&
  22. "" != this.properties.controller &&
  23. this.properties.key &&
  24. (this.properties.param
  25. ? s.default.ControllerManager.applyFunc2(
  26. o.ControllerConst[this.properties.controller],
  27. this.properties.key,
  28. ...this.parseParam(this.properties.param)
  29. )
  30. : s.default.ControllerManager.applyFunc2(
  31. o.ControllerConst[this.properties.controller],
  32. this.properties.key,
  33. this.properties.param
  34. )),
  35. this.properties.notification &&
  36. "" !== this.properties.notification &&
  37. s.default.NotificationCenter.dispatch(this.properties.notification, this.properties.param);
  38. }
  39. tick(t) {
  40. return a.b3.SUCCESS;
  41. }
  42. close(t) {}
  43. }
  44. (i.default = n), a.register(n, "NGASpecial");