Game Development Reference
In-Depth Information
Figure 15-17 . Edit these six .setiSound() methods, created by NetBeans, at the bottom of the InvinciBagel.java class
The edit process is relatively easy: select the set part of setiSound and type “play”
over the set; select the inside of the parameter area ( AudioClip iSound# ), and hit the
delete or backspace key to remove that; and finally, select the “ = isound ” part of the
Java statement, inside of the method between this.iSound and the ; semicolon and type
in .play() instead. The completed Java method bodies are shown in Figure 15-18 and
should look like the following:
public void playiSound0() {
this. iSound0 .play();
}
public void playiSound1() {
this. iSound1 .play();
}
public void playiSound2() {
this. iSound2 .play();
}
public void playiSound3() {
this. iSound3 .play();
}
public void playiSound4() {
this. iSound4 .play();
}
public void playiSound5() {
this. iSound5 .play();
}
 
Search WWH ::




Custom Search