void GetValue() { User u = SaveJson.ReadJson <User>(GameBaseSetting.JsonPath);//用户文件 if (u != null) { GameBaseSetting.Sname = u.SName; GameBaseSetting.Id = u.Id; } }
void Start() { GameBaseSetting.DestoryBGM = true; //生成首个地图模块 GameObject go = GetComponent <GoPool>().GetGo(0, false); go.SetActive(true); //设置音量 var Vol = SaveJson.ReadJson <VOLBase>(GameBaseSetting.VolJsonPath); VOLBaseSetting.BgmVOL = Vol.BgmVOL; VOLBaseSetting.ActionVOL = Vol.ActionVOL; VOLBaseSetting.PropVOL = Vol.PropVOL; BGM.GetComponent <AudioSource>().volume = Vol.BgmVOL; ActionBGM.GetComponent <AudioSource>().volume = Vol.ActionVOL; PropBGM.GetComponent <AudioSource>().volume = Vol.PropVOL; }