RechargeActivity.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import UIMgr from "../base/UIMgr";
  2. cc.Class({
  3. extends: cc.Component,
  4. properties: {
  5. },
  6. // LIFE-CYCLE CALLBACKS:
  7. // onLoad () {},
  8. start () {
  9. },
  10. setType(type, faterJs){
  11. this.type = type;
  12. this.faterJs = faterJs;
  13. },
  14. setCloseCb(cb){
  15. this.cb = cb;
  16. },
  17. //鸿运礼包
  18. onClickHongyun(){
  19. if(this.type == 0)
  20. return;
  21. UIMgr.openUI('prefabs/FortuneGiftLayer');
  22. this.faterJs.onClose();
  23. },
  24. //满享礼包
  25. onClickManxiang(){
  26. if(this.type == 1)
  27. return;
  28. UIMgr.openUI('prefabs/SupplyLayer');
  29. this.faterJs.onClose();
  30. },
  31. //赏金站令
  32. onClickZhanling(){
  33. if(this.type == 2)
  34. return;
  35. UIMgr.openUI('prefabs/ShangCardLayer');
  36. this.faterJs.onClose();
  37. },
  38. //存钱罐
  39. onClickPig(){
  40. if(this.type == 3)
  41. return;
  42. UIMgr.openUI('prefabs/PigLayer');
  43. this.faterJs.onClose();
  44. },
  45. });