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

25 lines
721 B
Java
Raw Normal View History

2025-03-11 00:23:54 +01:00
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;
}
2025-03-11 00:23:54 +01:00
public PositionedSound(SoundEvent event, float volume, float xPosition, float yPosition, float zPosition) {
this(event, volume, true, xPosition, yPosition, zPosition);
}
2025-03-11 00:23:54 +01:00
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;
}
2025-03-11 00:23:54 +01:00
}