public void WriteToFile(BinaryWriter Writer) { StringHelpers.WriteString16(Writer, CutsceneName); Writer.Write(unk05); Writer.Write(gcsSize); AssetContent.WriteToFile(Writer); if (SoundContent != null) { Writer.Write(true); // Has SPD SoundContent.WriteToFile(Writer); } // TODO: Not sure if this is fully valid or not.. if (VehicleContent != null && VehicleContent.Length > 0) { Writer.Write(VehicleContent.Length); // Num GCR foreach (GCRData VehicleData in VehicleContent) { VehicleData.WriteToFile(Writer); } } else { Writer.Write(0); } }
public void WriteToFile(BinaryWriter Writer) { StringHelpers.WriteString16(Writer, CutsceneName); Writer.Write(unk05); Writer.Write(gcsSize); AssetContent.WriteToFile(Writer); if (SoundContent != null) { Writer.Write(true); // Has SPD SoundContent.WriteToFile(Writer); } Writer.Write(0); // Num GCR }
public SoundContent AddSoundEffect(string name) { SoundContent sound = new SoundContent(name); if (!_sounds.Contains(sound)) { _sounds.Add(sound); return(sound); } _sounds.Add(sound); int index = _sounds.IndexOf(sound); return(_sounds[index]); }
void LoadSoundEffects(ContentManager content) { for (int i = currentSoundCount; i < _sounds.Count; i++) { if (_sounds[i] != null) { SoundContent sound = _sounds[i]; try { sound.Sound = content.Load <SoundEffect>(sound.Name); } catch (Exception e) { } } currentSoundCount++; } }
public void AddSoundContent(SoundContent soundPack) { _sounds.Add(soundPack); }