2024-04-03 02:43:18 -07:00
|
|
|
import { _decorator, Button, Component, Node } from 'cc';
|
2024-05-27 02:19:31 -07:00
|
|
|
import AudioManager from '../Manager/AudioManager';
|
2024-04-03 02:43:18 -07:00
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
|
|
@ccclass('ButonSound')
|
|
|
|
export class ButonSound extends Component {
|
|
|
|
@property({ type: Node, visible: true })
|
|
|
|
private _unMute: Node;
|
|
|
|
@property({ type: Node, visible: true })
|
|
|
|
private _mute: Node;
|
|
|
|
|
|
|
|
public clickBtn() {
|
2024-05-27 02:19:31 -07:00
|
|
|
const mute = AudioManager.toggleMute();
|
2024-04-03 02:43:18 -07:00
|
|
|
this._mute.active = mute;
|
|
|
|
this._unMute.active = !mute;
|
|
|
|
}
|
|
|
|
}
|