Easter eggs Acceptance Criteria: - Seagulls make sounds when your boat is close to them (can be changed to where your pivot point is but unsure what to use). - After putting in sails in sails out sails in sails out upwind downwind upwind downwind tack/gybe vmg the tomato should change as well as the seagull sounds. - Matching finding should be working now. Note: Islands have been removed as it looked bad in night mode. See merge request !72main
commit
4d6de8bc9f
@ -0,0 +1,25 @@
|
||||
package visualiser.model;
|
||||
|
||||
|
||||
import javafx.scene.media.AudioClip;
|
||||
|
||||
/**
|
||||
* Created by Gondr on 9/10/2017.
|
||||
*/
|
||||
public class SeagullSound {
|
||||
|
||||
private AudioClip sound;
|
||||
|
||||
public SeagullSound(String file){
|
||||
this.sound = new AudioClip(file);
|
||||
}
|
||||
|
||||
public void setVolume(double volume){
|
||||
sound.setVolume(volume);
|
||||
sound.volumeProperty().setValue(volume);
|
||||
}
|
||||
|
||||
public void play(){
|
||||
this.sound.play();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package visualiser.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Gondr on 9/10/2017.
|
||||
*/
|
||||
public class SoundAssets {
|
||||
public static SeagullSound defaultSound;
|
||||
public static List<SeagullSound> seagullSounds = new ArrayList<>();
|
||||
|
||||
public static void loadAssets(){
|
||||
loadSeagullSounds();
|
||||
}
|
||||
|
||||
public static void loadSeagullSounds(){
|
||||
defaultSound = new SeagullSound(SoundAssets.class.getClassLoader().getResource("assets/Seagull Sounds/default.wav").toExternalForm());
|
||||
defaultSound.setVolume(0.02);
|
||||
seagullSounds.add(new SeagullSound(SoundAssets.class.getClassLoader().getResource("assets/Seagull Sounds/seagle.mp3").toExternalForm()));
|
||||
seagullSounds.get(0).setVolume(0.05);
|
||||
seagullSounds.add(new SeagullSound(SoundAssets.class.getClassLoader().getResource("assets/Seagull Sounds/Seagull 1.wav").toExternalForm()));
|
||||
seagullSounds.get(1).setVolume(0.03);
|
||||
seagullSounds.add(new SeagullSound(SoundAssets.class.getClassLoader().getResource("assets/Seagull Sounds/Seagull 2.wav").toExternalForm()));
|
||||
seagullSounds.get(2).setVolume(0.03);
|
||||
seagullSounds.add(new SeagullSound(SoundAssets.class.getClassLoader().getResource("assets/Seagull Sounds/Seagull 3.wav").toExternalForm()));
|
||||
seagullSounds.get(3).setVolume(0.03);
|
||||
seagullSounds.add(new SeagullSound(SoundAssets.class.getClassLoader().getResource("assets/Seagull Sounds/Seagull 4.wav").toExternalForm()));
|
||||
seagullSounds.get(4).setVolume(0.03);
|
||||
seagullSounds.add(new SeagullSound(SoundAssets.class.getClassLoader().getResource("assets/Seagull Sounds/seagulls.wav").toExternalForm()));
|
||||
seagullSounds.get(5).setVolume(0.06);
|
||||
seagullSounds.add(new SeagullSound(SoundAssets.class.getClassLoader().getResource("assets/Seagull Sounds/Voice 001.wav").toExternalForm()));
|
||||
seagullSounds.get(6).setVolume(0.015);
|
||||
seagullSounds.add(new SeagullSound(SoundAssets.class.getClassLoader().getResource("assets/Seagull Sounds/Why.mp3").toExternalForm()));
|
||||
seagullSounds.get(7).setVolume(0.06);
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 102 KiB |
Loading…
Reference in new issue