﻿// Decompiled with JetBrains decompiler
// Type: AudioMgr
// Assembly: Wb.Lpw.Game.Client.Unity.Engine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 3F4302ED-49ED-4E48-8E20-F8FD6A6B47F5
// Assembly location: C:\Users\CGA Computer\Desktop\LEGO Universe Stuff\LOCO Server\Unity Web Player Extractor\Saved Files\LOCO Server.unity3d_unpacked\Wb.Lpw.Game.Client.Unity.Engine.dll

using UnityEngine;
using Wb.Lpw.Shared.Client.UnityEngine;
using Wb.Lpw.Shared.Common;

public class AudioMgr : IManager, IDisposableStatic
{
  public static AudioMgr Instance { get; private set; }

  public WBAudioManager AudioManager { get; private set; }

  protected override void Awake()
  {
    base.Awake();
    AudioMgr.Instance = this;
  }

  public static string AudioPrefabPath(string filename)
  {
    return AssetPath.BuildPlatformAssetBundleName("Audio", filename);
  }

  public static string AudioClipPath(string filename)
  {
    return AssetPath.BuildPlatformAssetBundleName("Audio/Clips", filename);
  }

  public override void Init()
  {
    base.Init();
    GameObject gameObject = (GameObject) Object.Instantiate(Resources.Load("SoundPrefabs/WBAudioManager"));
    gameObject.get_transform().set_parent(((Component) this).get_transform());
    this.AudioManager = (WBAudioManager) gameObject.GetComponentInChildren<WBAudioManager>();
    WBAudioManager.Instance.SetAllSFXMuteState(ClientPreferenceMgr.Instance.Pref.muteSFX);
    WBAudioManager.Instance.SetAllMusicMuteState(ClientPreferenceMgr.Instance.Pref.muteMusic);
    this.m_status = IManager.Status.FullReady;
  }

  public virtual void DisposeStatic()
  {
    AudioMgr.Instance = (AudioMgr) null;
  }
}
