view_not_have_interact.ts 748 B

123456789101112131415161718192021222324
  1. import { _decorator, Component, Node } from 'cc';
  2. import { view_ui_att_item } from './view_ui_att_item';
  3. import { not_have_interact_data } from '../../../data/data';
  4. const { ccclass, property } = _decorator;
  5. @ccclass('view_not_have_interact')
  6. export class view_not_have_interact extends Component {
  7. @property(Node) bg:Node = null;
  8. private m_data:not_have_interact_data = null;
  9. public updateView(data:not_have_interact_data){
  10. if(data===null){
  11. data = new not_have_interact_data;
  12. }
  13. this.m_data = data;
  14. this.bg.getComponent(view_ui_att_item).updateAtt(data.bg)
  15. data.bg = this.bg.getComponent(view_ui_att_item).getData()
  16. }
  17. public getData(){
  18. return this.m_data;
  19. }
  20. }