scoreParticle.js 546 B

12345678910111213141516171819202122232425262728
  1. cc.Class({
  2. extends: cc.Component,
  3. properties: {
  4. particle: cc.ParticleSystem,
  5. },
  6. // LIFE-CYCLE CALLBACKS:
  7. // onLoad () {},
  8. init(s, pos, time) {
  9. this._score = s
  10. this.node.x = pos.x
  11. this.node.y = pos.y
  12. this.node.active = true
  13. // this.particle.resetSystem()
  14. this.node.scale = 1
  15. setTimeout(() => {
  16. this.node.active = false
  17. this.particle.stopSystem()
  18. // s.scoreParticlePool.put(this.node)
  19. }, time / 1
  20. //(cc.game.getFrameRate() / 60)
  21. )
  22. }
  23. // update (dt) {},
  24. });