lab_font.ts 298 B

123456789101112
  1. import { _decorator, Component, Label, Node } from 'cc';
  2. const { ccclass, property } = _decorator;
  3. @ccclass('lab_font')
  4. export class lab_font extends Component {
  5. @property(Node) lab_name:Node;
  6. public initLab(text:string){
  7. this.lab_name.getComponent(Label).string = text;
  8. }
  9. }