import { eventTarget, PLAY_ROLLING_SOUND } from "./Events";


const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    @property(cc.AudioSource)
    private rollingSound: cc.AudioSource = null;

    onLoad () {
        eventTarget.on(PLAY_ROLLING_SOUND, this.playRollingSound, this);
    }

    private playRollingSound() {
        this.rollingSound.play();
    }

}
