DiamondPolicy.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Learn cc.Class:
  2. // - https://docs.cocos.com/creator/2.4/manual/en/scripting/class.html
  3. // Learn Attribute:
  4. // - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
  5. // Learn life-cycle callbacks:
  6. // - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
  7. cc.Class({
  8. extends: cc.BaseClass,
  9. properties: {
  10. // foo: {
  11. // // ATTRIBUTES:
  12. // default: null, // The default value will be used only when the component attaching
  13. // // to a node for the first time
  14. // type: cc.SpriteFrame, // optional, default is typeof default
  15. // serializable: true, // optional, default is true
  16. // },
  17. // bar: {
  18. // get () {
  19. // return this._bar;
  20. // },
  21. // set (value) {
  22. // this._bar = value;
  23. // }
  24. // },
  25. },
  26. // LIFE-CYCLE CALLBACKS:
  27. // onLoad () {},
  28. start () {
  29. },
  30. OnShowView: function () {
  31. this.m_nNeedUpdate = 0;
  32. ShowO2I(this.node);
  33. },
  34. OnHideView: function () {
  35. this.unschedule(this.OnTimer_DelayShow);
  36. this.m_nNeedUpdate = 0;
  37. HideI2O(this.node);
  38. },
  39. });