예제 #1
0
 void OnEnable()
 {
     this.closeColorSchemeListAction(); // switch to the correct panel
     this.colorblindModeToggle.isOn = DataAndSettingsManager.getColorblindModeState();
     this.smoothMovementToggle.isOn = DataAndSettingsManager.getSmoothMovementState();
     this.musicToggle.isOn          = DataAndSettingsManager.getMusicEnabledState();
     this.soundsToggle.isOn         = DataAndSettingsManager.getSoundsEnabledState();
 }
예제 #2
0
 void Awake()
 {
     foreach (Sound s in sounds)
     {
         s.source        = this.gameObject.AddComponent <AudioSource>();
         s.source.clip   = s.clip;
         s.source.volume = s.volume;
         s.source.loop   = s.loop;
     }
     this.musicEnabled  = DataAndSettingsManager.getMusicEnabledState();
     this.soundsEnabled = DataAndSettingsManager.getSoundsEnabledState();
 }