auto_topMenu.ts 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. const { ccclass } = cc._decorator;
  2. @ccclass
  3. export default class auto_topMenu extends cc.Component {
  4. topMenu: cc.Node;
  5. daynum: cc.Node;
  6. day_num: cc.Node;
  7. pause_btn: cc.Node;
  8. pause: cc.Node;
  9. numNode: cc.Node;
  10. bg: cc.Node;
  11. role_sp: cc.Node;
  12. role_num: cc.Node;
  13. bullet_num: cc.Node;
  14. power_num: cc.Node;
  15. reducePower_num: cc.Node;
  16. Sun_sp: cc.Node;
  17. Moon_sp: cc.Node;
  18. testPanel: cc.Node;
  19. bullet_editBox: cc.Node;
  20. BACKGROUND_SPRITE: cc.Node;
  21. TEXT_LABEL: cc.Node;
  22. PLACEHOLDER_LABEL: cc.Node;
  23. bullet_btn: cc.Node;
  24. bullet: cc.Node;
  25. addHero_btn: cc.Node;
  26. addBoss_btn: cc.Node;
  27. openUI_btn: cc.Node;
  28. btns_node: cc.Node;
  29. btn_welfare: cc.Node;
  30. tip_welfare: cc.Node;
  31. bottom_btn: cc.Node;
  32. btn_drop: cc.Node;
  33. tip_drop: cc.Node;
  34. btn_sign: cc.Node;
  35. tip_sign: cc.Node;
  36. btn_shop: cc.Node;
  37. tip_shop: cc.Node;
  38. public static URL:string = "db://assets/resources/prefab/Interface/topMenu.prefab"
  39. onLoad () {
  40. this.topMenu = this.node
  41. this.daynum = this.topMenu.getChildByName("daynum");
  42. this.day_num = this.daynum.getChildByName("day_num");
  43. this.pause_btn = this.topMenu.getChildByName("pause_btn");
  44. this.pause = this.pause_btn.getChildByName("pause");
  45. this.numNode = this.topMenu.getChildByName("numNode");
  46. this.bg = this.numNode.getChildByName("bg");
  47. this.role_sp = this.bg.getChildByName("role_sp");
  48. this.role_num = this.bg.getChildByName("role_num");
  49. this.bullet_num = this.bg.getChildByName("bullet_num");
  50. this.power_num = this.bg.getChildByName("power_num");
  51. this.reducePower_num = this.bg.getChildByName("reducePower_num");
  52. this.Sun_sp = this.topMenu.getChildByName("Sun_sp");
  53. this.Moon_sp = this.topMenu.getChildByName("Moon_sp");
  54. this.testPanel = this.topMenu.getChildByName("testPanel");
  55. this.bullet_editBox = this.testPanel.getChildByName("bullet_editBox");
  56. this.BACKGROUND_SPRITE = this.bullet_editBox.getChildByName("BACKGROUND_SPRITE");
  57. this.TEXT_LABEL = this.bullet_editBox.getChildByName("TEXT_LABEL");
  58. this.PLACEHOLDER_LABEL = this.bullet_editBox.getChildByName("PLACEHOLDER_LABEL");
  59. this.bullet_btn = this.testPanel.getChildByName("bullet_btn");
  60. this.bullet = this.testPanel.getChildByName("bullet");
  61. this.addHero_btn = this.testPanel.getChildByName("addHero_btn");
  62. this.addBoss_btn = this.testPanel.getChildByName("addBoss_btn");
  63. this.openUI_btn = this.testPanel.getChildByName("openUI_btn");
  64. this.btns_node = this.topMenu.getChildByName("btns_node");
  65. this.btn_welfare = this.btns_node.getChildByName("btn_welfare");
  66. this.tip_welfare = this.btn_welfare.getChildByName("tip_welfare");
  67. this.bottom_btn = this.topMenu.getChildByName("bottom_btn");
  68. this.btn_drop = this.bottom_btn.getChildByName("btn_drop");
  69. this.tip_drop = this.btn_drop.getChildByName("tip_drop");
  70. this.btn_sign = this.bottom_btn.getChildByName("btn_sign");
  71. this.tip_sign = this.btn_sign.getChildByName("tip_sign");
  72. this.btn_shop = this.bottom_btn.getChildByName("btn_shop");
  73. this.tip_shop = this.btn_shop.getChildByName("tip_shop");
  74. }
  75. }