TipsLayer.js 456 B

1234567891011121314151617181920212223242526272829303132
  1. import UIMgr from "../base/UIMgr";
  2. cc.Class({
  3. extends: cc.Component,
  4. properties: {
  5. ani: cc.Animation,
  6. labTip: cc.Label,
  7. },
  8. // LIFE-CYCLE CALLBACKS:
  9. // onLoad () {},
  10. start () {
  11. },
  12. setCon(conent){
  13. this.ani.play();
  14. this.labTip.string = conent;
  15. this.unscheduleAllCallbacks();
  16. this.scheduleOnce(()=>{
  17. UIMgr.closeUI('TipsLayer');
  18. }, 1.5);
  19. },
  20. });