UserPackIndicator.js 897 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. cc.Class({
  2. extends: cc.Component,
  3. properties: {
  4. isSelected: {
  5. get: function() {
  6. if (!this._isSelected) {
  7. this._isSelected = false;
  8. }
  9. return this._isSelected;
  10. },
  11. set: function(value) {
  12. this._isSelected = value;
  13. if (this._isSelected) {
  14. this.selectedNode.active = true;
  15. this.normalNode.active = false;
  16. } else {
  17. this.selectedNode.active = false;
  18. this.normalNode.active = true;
  19. }
  20. }
  21. },
  22. selectedNode: cc.Node,
  23. normalNode: cc.Node,
  24. pageLabel: cc.Label,
  25. indicatorIndex: 0,
  26. },
  27. // LIFE-CYCLE CALLBACKS:
  28. // onLoad () {},
  29. start () {
  30. },
  31. // update (dt) {},
  32. });