tcr/java/src/game/audio/PositionedSound.java

24 lines
721 B
Java
Executable file

package game.audio;
import game.init.SoundEvent;
public class PositionedSound extends Sound {
public PositionedSound(SoundEvent event, Volume type) {
this(event, 1.0F, false, 0.0F, 0.0F, 0.0F);
this.type = type;
}
public PositionedSound(SoundEvent event, float volume, float xPosition, float yPosition, float zPosition) {
this(event, volume, true, xPosition, yPosition, zPosition);
}
private PositionedSound(SoundEvent event, float volume, boolean attenuationType, float xPosition, float yPosition, float zPosition) {
super(event);
this.volume = volume;
this.xPosF = xPosition;
this.yPosF = yPosition;
this.zPosF = zPosition;
this.repeat = false;
this.attenuationType = attenuationType;
}
}