Test.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Learn TypeScript:
  2. // - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
  3. // Learn Attribute:
  4. // - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
  5. // Learn life-cycle callbacks:
  6. // - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
  7. import JsbSystem from "./mk/system/JsbSystem";
  8. const { ccclass, property } = cc._decorator;
  9. @ccclass
  10. export default class Test extends cc.Component {
  11. // LIFE-CYCLE CALLBACKS:
  12. // onLoad () {}
  13. start() {
  14. }
  15. // update (dt) {}
  16. /** 显示开屏 */
  17. showSplashAd() {
  18. JsbSystem.showGMoreSplashAd();
  19. }
  20. /** 显示激励视频 */
  21. showRewardVideoAd() {
  22. JsbSystem.showGMoreRewardAd();
  23. }
  24. /** 显示插屏 */
  25. showInterAd() {
  26. JsbSystem.showGMoreInterAd();
  27. }
  28. /** 显示全屏 */
  29. showFullVideoAd() {
  30. JsbSystem.showGMoreFullVideoAd();
  31. }
  32. /** 显示banner */
  33. showBannerAd() {
  34. JsbSystem.showGMoreBannerAd();
  35. }
  36. /** 显示信息流 */
  37. showFeedListAd() {
  38. JsbSystem.showGMoreFeedListAd();
  39. }
  40. }