Mattie

Untitled

Apr 5th, 2010
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.99 KB | None | 0 0
  1. public void controleerBotsing(String kleur)
  2.     //doet een controle of 1 van de bomberman's enige andere bomberman overlapt
  3.     //zo ja dan wordt botsing true en wordt de verplaatsing teruggedraait
  4.     {
  5.         botsing = false;       
  6.         for (int positie = 0; positie < objecten.size(); positie++)
  7.         {
  8.             Bomberman b = objecten.get(positie);
  9.             if(kleur.equals("Groen"))
  10.             {
  11.                 if(Botsing.overlapt(bombermanGroen, b) && bombermanGroen != b)
  12.                     // alle bombermans, BEHALVE wanneer groen niet gelijk is aan de objecten.get
  13.                 {
  14.                     botsing = true;
  15.                 }              
  16.             }
  17.             if(kleur.equals("Rood"))
  18.             {
  19.                 if(Botsing.overlapt(bombermanRood, b) && bombermanRood != b)
  20.                 {
  21.                     botsing = true;
  22.                 }              
  23.             }
  24.             if(kleur.equals("Geel"))
  25.             {
  26.                 if(Botsing.overlapt(bombermanGeel, b) && bombermanGeel != b)
  27.                 {
  28.                     botsing = true;
  29.                 }              
  30.             }
  31.             if(kleur.equals("Zwart"))
  32.             {
  33.                 if(Botsing.overlapt(bombermanZwart, b) && bombermanZwart != b)
  34.                 {
  35.                     botsing = true;
  36.                 }              
  37.             }
  38.         }      
  39.     }
Add Comment
Please, Sign In to add comment