UI_Head_Icon.ts 581 B

123456789101112131415161718192021222324252627
  1. import { _decorator, Component, Node, Sprite, SpriteFrame } from 'cc';
  2. import { Hall } from '../../hall/Hall';
  3. const { ccclass, property } = _decorator;
  4. @ccclass('UI_Head_Icon')
  5. export class UI_Head_Icon extends Component {
  6. @property(Sprite)
  7. private head:Sprite;
  8. @property([SpriteFrame])
  9. private default_head:SpriteFrame[] = [];
  10. start() {
  11. }
  12. update(deltaTime: number) {
  13. }
  14. show(uid:string,head:string|null):void{
  15. const rc=this.default_head[0];
  16. Hall.getInstance().head_icon.showIcon(uid,head,this.head,rc);
  17. }
  18. }