CaiPiaoHallController.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import FireEventObserver from '../framework/FireEventObserver';
  2. import SubHallManger from '../view/subHallManger'
  3. cc.Class({
  4. extends: SubHallManger,
  5. properties: {
  6. gamesNode:cc.Node,
  7. subgamesNode:cc.Node,
  8. },
  9. onLoad()
  10. {
  11. // var subcp= [['1' , []],
  12. // ['2' , [19,20,32]],
  13. // ['3' , [5,6,11,14,17,22,27,29]],
  14. // ['4' , [2,8,12,16,18]],
  15. // ['5' , [3,10,13,25,26,28,30,31]],
  16. // ['7' , [1,7,23,24]],
  17. // ['9' , [4,9,15,21]]]
  18. var subcp= [['1' , []],
  19. ['2' , [10,11,12]],
  20. ['3' , [28,29,30,31,32,33,34,35]],
  21. ['4' , [5,6,7,8,9]],
  22. ['5' , [19,20,21,22,23,24,25,26,27]],
  23. ['9' , [13,14,15,16,17,18]],
  24. ['11' , [1,2,3,4]]]
  25. this.myMap = new Map(subcp);
  26. console.log(this.myMap.keys());
  27. },
  28. ClickGamesBtn(sender,customEventData)
  29. {
  30. var showingHall = this.subgamesNode.getComponent('CaiPiaosubHallController')
  31. var needgames = this.myMap.get(customEventData)
  32. showingHall.plane = this.subgamesNode.getChildByName("nameplane"+customEventData)
  33. showingHall.showNeedGames(needgames)
  34. showingHall.parentScene = this
  35. this.playEnd(showingHall)
  36. },
  37. });