// pg.event.emit('img_voice_play_voice_start')
// pg.event.emit('img_voice_play_voice_end')




const { ccclass, property } = cc._decorator;

@ccclass
export default class Candy extends cc.Component {
    private img_npc_voice: cc.Node;
    onLoad() {
        this.initView();
        this.playVoiceStart();
    }
    initView() {
        this.img_npc_voice = this.node;
    }
    initEvent() {
        // pg.event.on('img_voice_play_voice_start', () => {
        //     this.playVoiceStart();
        // })
        // pg.event.on('img_voice_play_voice_end', () => {
        // })
    }
    private playVoiceCount: number;
    playVoiceStart() {

        this.node.children.forEach((ch) => {
            let x = ch.x;
            let y = ch.y;
            ch.x = 0;
            ch.y = 0;
            let ju = cc.jumpBy(0.5, cc.v2(x, y), 80, 1);
            ch.runAction(ju);

        })


    }
    playVoiceRunning() {

    }
}


