1 / 7

Dyna Blaster

Dyna Blaster. Avtor: Sabina Bratuž 4.Rb Mentor: mag. Boštjan Vouk. Zaključna naloga. Izdelava v programskem jeziku Java v integriranem razvojnem okolju NetBeans P redelava originalne igre Dyna Blaster Cilj igre: Igralec hodi po labirintu, razstreljuje opeke in pošasti

berny
Télécharger la présentation

Dyna Blaster

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DynaBlaster Avtor: Sabina Bratuž 4.Rb Mentor: mag. Boštjan Vouk

  2. Zaključnanaloga Izdelava v programskem jeziku Java v integriranem razvojnem okolju NetBeans Predelava originalne igre Dyna Blaster Cilj igre: Igralec hodi po labirintu, razstreljuje opeke in pošasti Ko izgubi vse življenja ali konča vse stopnje je igre konec Igra za dva igralca

  3. Glavni meni Igraj Navodila Rekordi Vizitka

  4. Igra Okno za izbiro načina igre Opozorilo na stopnjopred začetko igre Ko uniči vse pošasti in gre skozi skrivna vrata napreduje na naslednjo stopnjo Število pošasti se veča

  5. Najtežji deli Deli, ki so mi povzročali težave Timer Pošasti

  6. Timer • Deklaracija, inicializacija in zagon • int delay=10; • Timer timer=new Timer(delay, game); • timer.start(); • Zaustavitev • Timer.stop(); if(tempCas==detCas){ bomba.setIcon(new javax.swing.ImageIcon(getClass().getResource("/seminarska/Images/player1/bomb.gif"))); } if(detCas+1100==tempCas){ bomba.setVisible(false); t.stop(); for(JLabel e:eksplozija){ e.setVisible(false); } bombaPostavljena=false; } ActionListener bombaAA=new ActionListener() { public void actionPerformed(ActionEvent evt) { tempCas+=delay; Izvedba več ukazov na točno določene časovne intervale

  7. Pošasti if(p==1){ for(int i=0;i<gCrash.length;i++){ if(priority[i]>0){ setL(koord[i][0],koord[i][1]); break; } } } if(speedH!=-1){ priority[0]+=1; } if(speedH!=1){ priority[1]+=1; } if(speedV!=1){ priority[2]+=1; } if(speedV!=-1){ priority[3]+=1; } if(p==2){ if(speedH+speedV==0 || crash.checkForChrash(speedH, speedV, monsterL, zid) || crash.checkForChrash(speedH,speedV, monsterL, labele)){ do{ random=rand.nextInt(4); }while(priority[random]<2); setL(koord[random][0],koord[random][1]); }else{ setL(speedH, speedV); } } if(p>=3){ do{ random=rand.nextInt(4); }while(priority[random]<2); setL(koord[random][0],koord[random][1]); } Pošasti se premikajo naključno V primeru trka z objektom„true“

More Related