BattleRoomPreviweCell.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. var BattleRoomPlayerIcon = require("BattleRoomPlayerIcon")
  2. cc.Class({
  3. extends: cc.Component,
  4. properties: {
  5. imageBg: {
  6. default: null,
  7. type: cc.Sprite,
  8. serializable: true,
  9. },
  10. textStatus: {
  11. default: null,
  12. type: cc.Label,
  13. serializable: true,
  14. },
  15. textPreviewNum: {
  16. default: null,
  17. type: cc.Label,
  18. serializable: true,
  19. },
  20. textRoundNum: {
  21. default: null,
  22. type: cc.Label,
  23. serializable: true,
  24. },
  25. buttonWatch: {
  26. default: null,
  27. type: cc.Button,
  28. serializable: true,
  29. },
  30. buttonFight: {
  31. default: null,
  32. type: cc.Button,
  33. serializable: true,
  34. },
  35. goldLayout: {
  36. default: null,
  37. type: cc.Node,
  38. serializable: true,
  39. },
  40. playerTop: {
  41. default: null,
  42. type: cc.Node,
  43. serializable: true,
  44. },
  45. playerBottom: {
  46. default: null,
  47. type: cc.Node,
  48. serializable: true,
  49. },
  50. player1: {
  51. default: null,
  52. type: BattleRoomPlayerIcon,
  53. serializable: true,
  54. },
  55. player2: {
  56. default: null,
  57. type: BattleRoomPlayerIcon,
  58. serializable: true,
  59. },
  60. player3: {
  61. default: null,
  62. type: BattleRoomPlayerIcon,
  63. serializable: true,
  64. },
  65. },
  66. setButtonSubShow(b) {
  67. this.buttonSub.node.active = b;
  68. },
  69. onClickCell() {
  70. if (this.onClickCb) {
  71. this.onClickCb(this.index, this.data)
  72. }
  73. },
  74. });