public AdvConfigSaveData() { List <TaggedMasterVolume> list = new List <TaggedMasterVolume>(); TaggedMasterVolume item = new TaggedMasterVolume { tag = "Others", volume = 1f }; list.Add(item); this.taggedMasterVolumeList = list; }
public void SetTaggedMasterVolume(string tag, float volume) { TaggedMasterVolume data = taggedMasterVolumeList.Find(x => x.tag == tag); if (data == null) { data = new TaggedMasterVolume(); data.tag = tag; taggedMasterVolumeList.Add(data); } data.volume = volume; }
public void Read(BinaryReader reader) { int num = reader.ReadInt32(); if (num <= 1) { this.isFullScreen = reader.ReadBoolean(); this.isMouseWheelSendMessage = reader.ReadBoolean(); this.isEffect = reader.ReadBoolean(); this.isSkipUnread = reader.ReadBoolean(); this.isStopSkipInSelection = reader.ReadBoolean(); this.messageSpeed = reader.ReadSingle(); this.autoBrPageSpeed = reader.ReadSingle(); this.messageWindowTransparency = reader.ReadSingle(); this.soundMasterVolume = reader.ReadSingle(); this.bgmVolume = reader.ReadSingle(); this.seVolume = reader.ReadSingle(); this.ambienceVolume = reader.ReadSingle(); this.voiceVolume = reader.ReadSingle(); this.voiceStopType = (VoiceStopType)reader.ReadInt32(); int num2 = reader.ReadInt32(); for (int i = 0; i < num2; i++) { reader.ReadBoolean(); } this.isAutoBrPage = reader.ReadBoolean(); if (num > 0) { this.messageSpeedRead = reader.ReadSingle(); this.hideMessageWindowOnPlayingVoice = reader.ReadBoolean(); this.isPlayingTextSound = reader.ReadBoolean(); int num4 = reader.ReadInt32(); this.taggedMasterVolumeList.Clear(); for (int j = 0; j < num4; j++) { TaggedMasterVolume item = new TaggedMasterVolume { tag = reader.ReadString(), volume = reader.ReadSingle() }; this.taggedMasterVolumeList.Add(item); } } } else { object[] args = new object[] { num }; Debug.LogError(LanguageErrorMsg.LocalizeTextFormat(ErrorMsg.UnknownVersion, args)); } }
public bool TryGetTaggedMasterVolume(string tag, out float volume) { TaggedMasterVolume data = taggedMasterVolumeList.Find(x => x.tag == tag); if (data == null) { volume = 0; return(false); } else { volume = data.volume; return(true); } }
/// <summary> /// バイナリ読み込み /// </summary> /// <param name="reader">バイナリリーダー</param> public virtual void Read(BinaryReader reader) { int version = reader.ReadInt32(); if (version <= VERSION) { isFullScreen = reader.ReadBoolean(); isMouseWheelSendMessage = reader.ReadBoolean(); isEffect = reader.ReadBoolean(); isSkipUnread = reader.ReadBoolean(); isStopSkipInSelection = reader.ReadBoolean(); messageSpeed = reader.ReadSingle(); autoBrPageSpeed = reader.ReadSingle(); messageWindowTransparency = reader.ReadSingle(); soundMasterVolume = reader.ReadSingle(); bgmVolume = reader.ReadSingle(); seVolume = reader.ReadSingle(); ambienceVolume = reader.ReadSingle(); voiceVolume = reader.ReadSingle(); voiceStopType = (VoiceStopType)(reader.ReadInt32()); int num = reader.ReadInt32(); for (int i = 0; i < num; i++) { reader.ReadBoolean(); } isAutoBrPage = reader.ReadBoolean(); if (version <= VERSION0) { return; } messageSpeedRead = reader.ReadSingle(); hideMessageWindowOnPlayingVoice = reader.ReadBoolean(); int count = reader.ReadInt32(); taggedMasterVolumeList.Clear(); for (int i = 0; i < count; i++) { TaggedMasterVolume item = new TaggedMasterVolume(); item.tag = reader.ReadString(); item.volume = reader.ReadSingle(); taggedMasterVolumeList.Add(item); } } else { Debug.LogError(LanguageErrorMsg.LocalizeTextFormat(ErrorMsg.UnknownVersion, version)); } }
/// キャラ別の音量設定など、タグつきのボリューム設定 public void SetTaggedMasterVolume(string tag, float volmue) { TaggedMasterVolume data = TaggedMasterVolumes.Find(x => x.Tag == tag); if (data == null) { TaggedMasterVolumes.Add(new TaggedMasterVolume() { Tag = tag, Volume = volmue }); } else { data.Volume = volmue; } }