-
Notifications
You must be signed in to change notification settings - Fork 0
/
SoundEffect.java
67 lines (52 loc) · 1.32 KB
/
SoundEffect.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import java.io.File;
public class SoundEffect {
private boolean effectStatus;
private String url;
private File gameWon; //specified the file format
private File gameLost;
private int defaultVolume;
public SoundEffect(boolean effectStatus, String url, File gameWon, File gameLost, int defaultVolume) {
this.effectStatus = effectStatus;
this.url = url;
this.gameWon = gameWon;
this.gameLost = gameLost;
this.defaultVolume = defaultVolume;
}
public SoundEffect(String url, int defaultVolume) {
this.url = url;
this.defaultVolume = defaultVolume;
}
public boolean isEffectStatus() {
return effectStatus;
}
public void play() {
System.out.println("Play");
}
public void setEffectStatus(boolean effectStatus) {
this.effectStatus = effectStatus;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public File getGameWon() {
return gameWon;
}
public void setGameWon(File gameWon) {
this.gameWon = gameWon;
}
public File getGameLost() {
return gameLost;
}
public void setGameLost(File gameLost) {
this.gameLost = gameLost;
}
public int getDefaultVolume() {
return defaultVolume;
}
public void setDefaultVolume(int defaultVolume) {
this.defaultVolume = defaultVolume;
}
}