Exemple #1
0
        //Tools
        private void Start()
        {
            //Load the config file
            NRSettings.LoadSettingsJson();

            notes         = new List <Target>();
            orderedNotes  = new List <Target>();
            loadedNotes   = new List <Target>();
            selectedNotes = new List <Target>();

            gridNotesStatic     = gridTransformParent;
            timelineNotesStatic = timelineTransformParent;

            NRSettings.OnLoad(() => {
                sustainVolume           = NRSettings.config.sustainVol;
                musicVolume             = NRSettings.config.mainVol;
                musicVolumeSlider.value = musicVolume;
                SetAudioDSP();
            });

            musicVolumeSlider.onValueChanged.AddListener(val => {
                musicVolume = val;
                NRSettings.config.mainVol = musicVolume;
                NRSettings.SaveSettingsJson();
            });

            StartCoroutine(CalculateNoteCollidersEnabled());

            Physics.autoSyncTransforms = false;
        }
Exemple #2
0
        public void InitPresence()
        {
            NRSettings.OnLoad(() => {
                if (!NRSettings.config.useDiscordRichPresence)
                {
                    gameObject.SetActive(false);
                    return;
                }

                showTime = NRSettings.config.showTimeElapsed;

                presence.details = "In Menus";
                presence.state   = "";

                presence.startTime =
                    showTime ? new DiscordTimestamp(Time.realtimeSinceStartup) : DiscordTimestamp.Invalid;

                float duration   = 0;
                presence.endTime = duration > 0
                    ? new DiscordTimestamp(Time.realtimeSinceStartup + duration)
                    : DiscordTimestamp.Invalid;



                //Register to a presence change
                DiscordManager.current.events.OnPresenceUpdate.AddListener((message) => {
                    Debug.Log("Received a new presence! Current App: " + message.ApplicationID + ", " + message.Name);
                });

                DiscordManager.current.SetPresence(presence);
            });
        }
Exemple #3
0
 private void Start()
 {
     SetDefaultVolumes();
     NRSettings.OnLoad(() => {
         mainSlider.value = (float)NRSettings.config.mainVol;
         SetMainVol();
     });
 }
Exemple #4
0
 private void Start()
 {
     aud    = GetComponent <AudioSource>();
     volume = volumeSlider.value;
     NRSettings.OnLoad(() => {
         noteHitScale       = NRSettings.config.noteHitScale;
         volume             = (float)NRSettings.config.noteVol;
         volumeSlider.value = volume;
     });
 }
Exemple #5
0
        //Tools
        private void Start()
        {
            //Load the config file
            NRSettings.LoadSettingsJson();

            notes         = new List <Target>();
            orderedNotes  = new List <Target>();
            loadedNotes   = new List <Target>();
            selectedNotes = new List <Target>();

            //securityRules.AddAccessRule(new FileSystemAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null), FileSystemRights.FullControl, AccessControlType.Allow));

            gridNotesStatic     = gridTransformParent;
            timelineNotesStatic = timelineTransformParent;

            //Modify the note colors


            StartCoroutine(CalculateNoteCollidersEnabled());

            Physics.autoSyncTransforms = false;
        }
Exemple #6
0
 public void SetSustainVol()
 {
     timeline.sustainVolume       = sustainSlider.value;
     NRSettings.config.sustainVol = timeline.sustainVolume;
     NRSettings.SaveSettingsJson();
 }
Exemple #7
0
 public void SetMainVol()
 {
     main.volume = mainSlider.value;
     NRSettings.config.mainVol = main.volume;
     NRSettings.SaveSettingsJson();
 }
Exemple #8
0
 public void VolumeChange(Slider vol)
 {
     volume = vol.value;
     NRSettings.config.noteVol = volume;
     NRSettings.SaveSettingsJson();
 }