import AudioCtr from "./AudioCtr";

/*
 * @Author: yeliyanyu
 * @Date: 2020-12-08 14:13:48
 * @LastEditTime: 2020-12-08 16:20:12
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /NewProject/assets/script/Main.ts
 */
const {ccclass, property} = cc._decorator;
@ccclass
export default class Main extends cc.Component {
    @property({
        type: cc.AudioClip
    })
    private dingdeng: cc.AudioClip = null;

    protected onClickFadeInMusic() {
        AudioCtr.playBgm(this.dingdeng, true, 5000);
    }

    protected onClickFadeOutMusic() {
        AudioCtr.stopBgm(this.dingdeng, 5000);
    }
}
