{"size": 1286, "ext": "js", "max_stars_repo_path": "build/MuteButton.js", "max_stars_repo_name": "barb0019/Serious-Game_BSF", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "build/MuteButton.js", "max_issues_repo_name": "barb0019/Serious-Game_BSF", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "build/MuteButton.js", "max_forks_repo_name": "barb0019/Serious-Game_BSF", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 35.7222222222, "max_line_length": 71, "alphanum_fraction": 0.566874028}
import Game from './Game.js';
import InteractingItems from './InteractingItems.js';
export default class MuteButton extends InteractingItems {
    static muted;
    game;
    constructor(xPos, yPos, type, game) {
        super(xPos, yPos, type, './assets/img/sound-image/UnMute.png');
        this.makeButton();
        MuteButton.muted = false;
        this.game = game;
    }
    makeButton() {
        const muteButton = document.createElement('img');
        muteButton.style.position = 'absolute';
        muteButton.style.top = '0px';
        muteButton.style.right = '0px';
        muteButton.src = './assets/img/sound-image/UnMuteV2.png';
        muteButton.width = 50;
        document.body.append(muteButton);
        muteButton.addEventListener('click', () => {
            if (MuteButton.muted === true) {
                muteButton.src = './assets/img/UnMuteV2.png';
                MuteButton.muted = false;
                Game.play(this.game.getUser().getLevel() - 1);
            }
            else {
                Game.pause(this.game.getUser().getLevel() - 1);
                muteButton.src = './assets/img/sound-image/UnMute.png';
                MuteButton.muted = true;
            }
        });
    }
    draw() {
    }
}
//# sourceMappingURL=MuteButton.js.map