| 1234567891011121314151617181920212223 |
- // Learn TypeScript:
- // - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
- // Learn Attribute:
- // - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
- // Learn life-cycle callbacks:
- // - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
- import PoolMgr, { NODEPOOLPREFABTYPE } from "../manager/PoolMgr";
- const { ccclass, property } = cc._decorator;
- @ccclass
- export default class Spray extends cc.Component {
- @property(sp.Skeleton)
- driftSpray: sp.Skeleton = null
- init() {
- this.driftSpray.setAnimation(0, 'animation', false)
- this.scheduleOnce(() => {
- PoolMgr.Inst.recyclePoolPrefab(NODEPOOLPREFABTYPE.Spray, this.node);
- }, 2)
- }
- }
|