StoreNavigation.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // Learn cc.Class:
  2. // - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/class.html
  3. // - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/class.html
  4. // Learn Attribute:
  5. // - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
  6. // - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/reference/attributes.html
  7. // Learn life-cycle callbacks:
  8. // - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
  9. // - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/life-cycle-callbacks.html
  10. cc.Class({
  11. extends: cc.Component,
  12. properties: {
  13. // foo: {
  14. // // ATTRIBUTES:
  15. // default: null, // The default value will be used only when the component attaching
  16. // // to a node for the first time
  17. // type: cc.SpriteFrame, // optional, default is typeof default
  18. // serializable: true, // optional, default is true
  19. // },
  20. // bar: {
  21. // get () {
  22. // return this._bar;
  23. // },
  24. // set (value) {
  25. // this._bar = value;
  26. // }
  27. // },
  28. storeMenu:{
  29. default:null,
  30. type:cc.Node
  31. },
  32. bottleStore:{
  33. default:null,
  34. type:cc.Node
  35. },
  36. arrowStore:{
  37. default:null,
  38. type:cc.Node
  39. },
  40. },
  41. // LIFE-CYCLE CALLBACKS:
  42. // onLoad () {},
  43. start () {
  44. },
  45. goBottleStore(){
  46. this.storeMenu.active = false;
  47. this.bottleStore.active = true;
  48. },
  49. goStoreMenu(){
  50. this.storeMenu.active = true;
  51. this.bottleStore.active = false;
  52. this.arrowStore.active = false;
  53. },
  54. goArrowStore(){
  55. this.storeMenu.active = false;
  56. this.arrowStore.active = true;
  57. },
  58. goStorePage(){
  59. this.storeMenu.active = false;
  60. this.arrowStore.active = true;
  61. },
  62. // update (dt) {},
  63. });