Class SoundTile.Wave
- java.lang.Object
-
- page.codeberg.terratactician_expandoria.world.tiles.SoundTile.Wave
-
- Enclosing class:
- SoundTile
public static class SoundTile.Wave extends java.lang.ObjectA wave which is generated / played back by a Sound Tile
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSoundTile.Wave.WaveformThe waveform used to generate a wave
-
Field Summary
Fields Modifier and Type Field Description floatamplifyUsed to multiply the wave output valuebooleanenabledTrue if the waveform is active Only active waves will be generate soundfloatfrequencyWave frequencyjava.lang.FloatoffsetPhase offset 1 = one secondSoundTile.Wave.WaveformwaveformWaveform used to generate the wave
-
Constructor Summary
Constructors Constructor Description Wave()Create a new wave using the default valuesWave(float frequency, SoundTile.Wave.Waveform waveform)Create a new configured wave from frequently used optionsWave(float frequency, SoundTile.Wave.Waveform waveform, boolean enabled, java.lang.Float offset, float amplify)Create a new configured wave by setting all options
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringdataToString()Returns wave information as a string.java.lang.ObjectserializeData()Outputs the wave as a JSON object.
-
-
-
Field Detail
-
frequency
public float frequency
Wave frequency
-
waveform
public SoundTile.Wave.Waveform waveform
Waveform used to generate the wave
-
enabled
public boolean enabled
True if the waveform is active Only active waves will be generate sound
-
offset
public java.lang.Float offset
Phase offset 1 = one second
-
amplify
public float amplify
Used to multiply the wave output value
-
-
Constructor Detail
-
Wave
public Wave()
Create a new wave using the default values
-
Wave
public Wave(float frequency, SoundTile.Wave.Waveform waveform)Create a new configured wave from frequently used options- Parameters:
frequency- frequency of this wavewaveform- waveform of this wave
-
Wave
public Wave(float frequency, SoundTile.Wave.Waveform waveform, boolean enabled, java.lang.Float offset, float amplify)Create a new configured wave by setting all options- Parameters:
frequency- frequency of this wavewaveform- waveform of this waveenabled- whether this wave is enabledoffset- phase offset of this wave. Set to null to not enforce an offset.amplify- amplification of this wave. Normal value range is [0,1].
-
-