Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package hello;
- ---
- ---
- public final class Game extends GameCanvas implements Runnable {
- ---
- AudioBackground audio_background;///audio kita
- public Game(){
- //constructor
- super(false);
- try{
- ---
- audio_background = new AudioBackground();///audio kita
- for(int i=0; i<sprite_bola.length; i++){
- ---
- }
- for(int i=0; i<sprite_lingkaran.length; i++){
- ---
- }
- ---
- }catch(IOException ex){
- }
- ---
- }
- ---
- protected void keyPressed(int keyCode){ //INI UNTUK TOMBOL ENTER
- int action = getGameAction(keyCode);
- if(action == FIRE){
- ---
- }else{
- if(is_bringing_theball == true){
- if(action == FIRE){
- if(---, true)){
- audio_background.play_audio("good.mid", 1);///audio kita
- ---
- }
- else{
- score -= 10;
- audio_background.play_audio("oh-no.mid", 1);///audio kita
- }
- }
- is_bringing_theball = false;
- }
- }
- }
- }
- public void start(){
- audio_background.play_audio("sound.mid", -1);///audio kita
- ---
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment