pub struct Sound {
pub id: SoundID,
pub play_delay: i16,
pub cache_time: i32,
pub items: Vec<SoundItem>,
}
Expand description
A “conceptual” sound, consisting of one or a group of sound files.
Items can be picked depending on the player’s civilization, and depending on the probabilities for each file.
Fields§
§id: SoundID
Unique ID for this sound.
play_delay: i16
TODO document.
cache_time: i32
TODO document.
items: Vec<SoundItem>
List of sound files in this sound.
Implementations§
Source§impl Sound
impl Sound
Sourcepub fn read_from<R: Read>(input: &mut R, version: FileVersion) -> Result<Self>
pub fn read_from<R: Read>(input: &mut R, version: FileVersion) -> Result<Self>
Read this sound from an input stream.
Sourcepub fn write_to<W: Write>(
&self,
output: &mut W,
version: FileVersion,
) -> Result<()>
pub fn write_to<W: Write>( &self, output: &mut W, version: FileVersion, ) -> Result<()>
Write this sound to an input stream.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sound
impl RefUnwindSafe for Sound
impl Send for Sound
impl Sync for Sound
impl Unpin for Sound
impl UnwindSafe for Sound
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more