<commit_before>using UnityEngine;
using System.Collections;

public class GlobalSoundsScript : MonoBehaviour {
    public static bool soundEnabled = true;
    public AudioSource buttonPressSound;

    static GlobalSoundsScript Instance;
    static bool playing = false; //work around the fact that TaskManager does a DontDestroyOnLoad

    void Start() {
        Instance = this;
    }

    public AudioClip[] songs;

    void Awake() {
        if (!playing) {
            playing = true;
            audio.Play();
        } else Destroy(this);
    }

    public static void PlayButtonPress() {
        Instance.buttonPressSound.Play();
    }

    void Update() {
        if (Input.GetKeyDown("m"))
            audio.mute = !audio.mute; // Disable music

        if (Input.GetKeyDown("n"))
            GlobalSoundsScript.soundEnabled = !GlobalSoundsScript.soundEnabled;
    }

    void OnLevelWasLoaded(int levelIndex) {
        var indexInArray = levelIndex - 1;

        if (indexInArray < songs.Length) {
            audio.clip = songs[indexInArray];
            audio.Play();
        }
    }
}<commit_msg>Behold the power of the modulus<commit_after>using UnityEngine;
using System.Collections;

public class GlobalSoundsScript : MonoBehaviour {
    public static bool soundEnabled = true;
    public AudioSource buttonPressSound;

    static GlobalSoundsScript Instance;
    static bool playing = false; //work around the fact that TaskManager does a DontDestroyOnLoad

    void Start() {
        Instance = this;
    }

    public AudioClip[] songs;

    void Awake() {
        if (!playing) {
            playing = true;
            audio.Play();
        } else Destroy(this);
    }

    public static void PlayButtonPress() {
        Instance.buttonPressSound.Play();
    }

    void Update() {
        if (Input.GetKeyDown("m"))
            audio.mute = !audio.mute; // Disable music

        if (Input.GetKeyDown("n"))
            GlobalSoundsScript.soundEnabled = !GlobalSoundsScript.soundEnabled;
    }

    void OnLevelWasLoaded(int levelIndex) {
        audio.clip = songs[(levelIndex - 1) % songs.Length];
        audio.Play();
    }
}
{'fraction_non_alphanumeric': 0.09581395348837209, 'fraction_numerical': 0.0009302325581395349, 'mean_word_length': 2.3661971830985915, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2214871', 'n_tokens_mistral': 605, 'n_tokens_neox': 575, 'n_words': 156}