attributes_name.ts 322 B

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