qi_pao_select_info.ts 1014 B

1234567891011121314151617181920212223242526272829303132333435363738
  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('qi_pao_select_info')
  9. export class qi_pao_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) btn_buy:Node = null
  14. private m_curData:itemData = null;
  15. start() {
  16. UIButton.BindClick(this.btn_buy,()=>{
  17. },this)
  18. }
  19. show(data:itemData){
  20. this.m_curData = data;
  21. this.lab_des.getComponent(Label).string = this.m_curData.des
  22. this.lab_name.getComponent(Label).string = this.m_curData.name
  23. //this.sp_icon.getComponent(Sprite)
  24. //ResMng
  25. }
  26. update(deltaTime: number) {
  27. }
  28. }