Help.ts 575 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * 帮助说明数据
  3. * @author
  4. */
  5. const { ccclass, property } = cc._decorator;
  6. @ccclass
  7. export default class Help extends cc.Component {
  8. @property({ type: cc.Label, displayName: '文字说明' })
  9. private lbl_desc: cc.Label = null;
  10. onLoad() {
  11. }
  12. start() {
  13. }
  14. update(dt) {
  15. if (g.help.init_desc_name) {
  16. this.initDesc();
  17. g.help.init_desc_name = '';
  18. }
  19. }
  20. private initDesc() {
  21. this.lbl_desc.string = g.help.getDescContent(g.help.init_desc_name);
  22. }
  23. }