void OnEnable()
        {
            if (_gearIcon == null)
            {
                _gearIcon = AssetDatabase.LoadAssetAtPath <Texture2D>(ACodeTool.GetEngineRootDirectory(true) + "Audio Manager/Textures/GearIcon.png") as Texture2D;
            }

            if (_runtimeAudioSettings == null)
            {
                _runtimeAudioSettings = new RuntimeChangableSettings();
            }
            if (_generalAudioSettings == null)
            {
                _generalAudioSettings = new GeneralAudioSettings();
            }
            if (_fadingSettings == null)
            {
                _fadingSettings = new FadingMusicSettings();
            }

            XmlDocument doc = AudioDataParser.Load();

            AssetDatabase.Refresh();

            InitConfiguration(doc);

            scrollPosition = Vector2.zero;
        }
Beispiel #2
0
        void Awake()
        {
            _runtimeAudioSettings = new RuntimeChangableSettings();
            _generalAudioSettings = new GeneralAudioSettings();

            LoadRuntimeChangableAudioSettings();
            LoadAudioConfiguration();

            musicSource = AddAudioSource();
            soundSource = new List <AudioSource>();
            soundSource.Add(AddAudioSource());

            audioBlock        = new AudioBlock();
            delay             = 0;
            _musicTrackVolume = 0;
            _musicState       = MusicStates.Default;
        }