res_interact_input.ts 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { _decorator, Component, Node } from 'cc';
  2. import { interact_input_data } from '../../../data/data';
  3. import { receive_res_item } from './receive_res_item';
  4. const { ccclass, property } = _decorator;
  5. @ccclass('res_interact_input')
  6. export class res_interact_input extends Component {
  7. @property(Node) img_number_0:Node = null;
  8. @property(Node) img_number_1:Node = null;
  9. @property(Node) img_number_2:Node = null;
  10. @property(Node) img_number_3:Node = null;
  11. @property(Node) img_number_4:Node = null;
  12. @property(Node) img_number_5:Node = null;
  13. @property(Node) img_number_6:Node = null;
  14. @property(Node) img_number_7:Node = null;
  15. @property(Node) img_number_8:Node = null;
  16. @property(Node) img_number_9:Node = null;
  17. @property(Node) img_number_xing:Node = null;
  18. @property(Node) img_number_jing:Node = null;
  19. @property(Node) img_bg:Node = null;
  20. @property(Node) input_default:Node = null;
  21. @property(Node) input_fail:Node = null;
  22. @property(Node) input_right:Node = null;
  23. private m_data:interact_input_data = null;
  24. public initView(data:interact_input_data){
  25. this.m_data = data;
  26. this.img_bg.getComponent(receive_res_item).initView( this.m_data.bg)
  27. this.img_number_0.getComponent(receive_res_item).initView( this.m_data.image_0)
  28. this.img_number_1.getComponent(receive_res_item).initView( this.m_data.image_1)
  29. this.img_number_2.getComponent(receive_res_item).initView( this.m_data.image_2)
  30. this.img_number_3.getComponent(receive_res_item).initView( this.m_data.image_3)
  31. this.img_number_4.getComponent(receive_res_item).initView( this.m_data.image_4)
  32. this.img_number_5.getComponent(receive_res_item).initView( this.m_data.image_5)
  33. this.img_number_6.getComponent(receive_res_item).initView( this.m_data.image_6)
  34. this.img_number_7.getComponent(receive_res_item).initView( this.m_data.image_7)
  35. this.img_number_8.getComponent(receive_res_item).initView( this.m_data.image_8)
  36. this.img_number_9.getComponent(receive_res_item).initView( this.m_data.image_9)
  37. this.img_number_xing.getComponent(receive_res_item).initView( this.m_data.image_xing)
  38. this.img_number_jing.getComponent(receive_res_item).initView( this.m_data.image_jing)
  39. this.input_default.getComponent(receive_res_item).initView( this.m_data.input_default)
  40. this.input_fail.getComponent(receive_res_item).initView( this.m_data.input_fail)
  41. this.input_right.getComponent(receive_res_item).initView( this.m_data.input_right)
  42. }
  43. }