tou_xiang_kuang_select_info.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { _decorator, Component, Node, Label, Sprite } from 'cc';
  2. import { itemData } from '../config/ItemDataConfig';
  3. import { GameMng } from '../GameMng';
  4. import { ResMng } from '../gcommon/ResMng';
  5. import { UIButton } from '../gcommon/UIButton';
  6. import { Tools } from '../Tools';
  7. const { ccclass, property } = _decorator;
  8. @ccclass('tou_xiang_kuang_select_info')
  9. export class tou_xiang_kuang_select_info extends Component {
  10. @property(Node) lab_des:Node = null
  11. @property(Node) lab_name:Node = null
  12. @property(Node) sp_icon:Node = null
  13. @property(Node) sp_head:Node = null
  14. @property(Node) btn_buy:Node = null
  15. private m_curData:itemData = null;
  16. start() {
  17. UIButton.BindClick(this.btn_buy,()=>{
  18. },this)
  19. Tools.loadWeiXinHead(GameMng._userData.user_avatar,this.sp_head.getComponent(Sprite))
  20. }
  21. show(data:itemData){
  22. this.m_curData = data;
  23. this.lab_des.getComponent(Label).string = this.m_curData.des
  24. this.lab_name.getComponent(Label).string = this.m_curData.name
  25. //this.sp_icon.getComponent(Sprite)
  26. //ResMng
  27. }
  28. update(deltaTime: number) {
  29. }
  30. }