ButtonSelect2.js 530 B

12345678910111213141516171819202122232425262728293031323334
  1. cc.Class({
  2. extends: cc.Component,
  3. properties: {
  4. imageNormal: {
  5. default: null,
  6. type: cc.Sprite,
  7. serializable: true,
  8. },
  9. imageLight: {
  10. default: null,
  11. type: cc.Sprite,
  12. serializable: true,
  13. },
  14. },
  15. // LIFE-CYCLE CALLBACKS:
  16. // onLoad () {},
  17. start () {
  18. },
  19. setSelect(b) {
  20. this.imageNormal.node.active = !b
  21. this.imageLight.node.active = b
  22. },
  23. // update (dt) {},
  24. });