Esempio n. 1
0
        private void Start()
        {
            if (uiContainer.activeSelf)
            {
                Hide();
            }

            _masterBus        = FMODUnity.RuntimeManager.GetBus("Bus:/");
            _musicBus         = FMODUnity.RuntimeManager.GetBus("bus:/Music");
            _soundBus         = FMODUnity.RuntimeManager.GetBus("bus:/SoundEffects");
            _tutorialsEnabled = true;

            var savingSystem = FindObjectOfType <SavingSystem>();

            savingSystem.LoadSettings();
        }
        private void Start()
        {
            masterBus   = FMODUnity.RuntimeManager.GetBus(Database.MasterBusID);
            musicBus    = FMODUnity.RuntimeManager.GetBus(Database.MusicBusID);
            ambienceBus = FMODUnity.RuntimeManager.GetBus(Database.AmbienceBusID);
            sfxBus      = FMODUnity.RuntimeManager.GetBus(Database.SfxBusID);

            masterBus.setVolume(MasterBusVolume);
            musicBus.setVolume(MusicBusVolume);
            ambienceBus.setVolume(AmbienceBusVolume);
            sfxBus.setVolume(SfxBusVolume);


            musicBus.setMute(MusicMute);
            ambienceBus.setMute(AmbienceMute);
            sfxBus.setMute(SfxMute);
#if UNITY_EDITOR
            UnityEditor.EditorUtility.audioMasterMute = MasterMute;
#else
            FMODUnity.RuntimeManager.MuteAllEvents(MasterMute);
#endif
        }
Esempio n. 3
0
 private void Start()
 {
     _masterBus = FMODUnity.RuntimeManager.GetBus(_masterBusString);
     Signals.Get <MenuSceneSignal>().Dispatch();
 }
Esempio n. 4
0
        public void InitTest()
        {
            if (_instance == null)
            {
                _instance = this;
                DontDestroyOnLoad(this.gameObject);
            }
            else if (_instance != this)
            {
                Destroy(this.gameObject);
            }

            masterBus = FMODUnity.RuntimeManager.GetBus("bus:/");
            AddService(new AudioService());
            AddService(new SafePlayerPrefs());
            AddService(new GameManager());
            AddService(new UIManager());
            GameObject.Find("DirectStart").GetComponent <SceneTestStart>().enabled = true;
            var GameId = 10;

/*
 * //PlayerPrefs.DeleteKey(PPKeys.GameId + "my");
 * if (!PlayerPrefs.HasKey(PPKeys.GameId + "my"))
 * {
 *
 *  Dictionary<string, PlayerSave> Games = new Dictionary<string, PlayerSave>();
 *  for (int i = 0; i < 10; i++)
 *  {
 *      PlayerSave player = new PlayerSave()
 *      {
 *          gameId = GameId + i,
 *          playerName = "eee" + i.ToString(),
 *          isGame = false,
 *          dool = 'd',
 *      };
 *      Games.Add(GameId.ToString(), player);
 *      GameId++;
 *  }
 *  foreach (var item in Games)
 *  {
 *      //Debug.Log("item" + item.Key + item.Value.playerName);
 *  }
 *
 *
 *
 *
 *  PlayerPrefs.SetString(PPKeys.GameId + "my", ObjectToGSData(Games).JSON.ToString());
 *
 *  //Debug.Log("trt" + trt);
 * }else
 * {
 *  Debug.Log("HasKey == true");
 *  string Data = PlayerPrefs.GetString(PPKeys.GameId + "my");
 *  JObject respObj = JObject.Parse(Data);
 *  respObj.Add("main", "tries");
 *  Debug.Log("respObj " + respObj.ToString());
 *  foreach (var item in respObj.Childs)
 *  {
 *      Debug.Log("item" + item +" val " +item.Value);
 *  }
 *  for (int i = 0; i < 9; i++)
 *  {
 *      JObject playerData = new JObject();
 *      playerData = respObj[i.ToString()];
 *      string arr = playerData["gameId"];
 *      Debug.Log("arr"+i + " " + arr + "Count " + respObj.Count);
 *  }
 *  //DData.AddJSONStringAsObject("my", Data);
 *
 *
 *
 * }
 */
        }