Advertisement
Guest User

BlackScorp

a guest
Feb 18th, 2010
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.82 KB | None | 0 0
  1.    $counter = 0;
  2.         for($y = $this->startY;$y <= ($this->startY+$this->displayHeight) ;$y++) {
  3.             if($counter %2 == 1) {
  4.                 $width = $this->startX+$this->displayWidth;
  5.             }else {
  6.                 $width = $this->startX+$this->displayWidth-1;
  7.             }
  8.  
  9.             for($x = $this->startX;$x < $width;$x++) {
  10.                 if(empty($this->mapTiles[$x][$y][0])) {
  11.                     $tile = 'black';
  12.                 }else {
  13.                     $tile = $this->mapTiles[$x][$y][0];
  14.                 }
  15.                 $this->jsonMapTiles[]= $tile;
  16.                 //Diese Ausgabe ist nur fr den test
  17.                 echo 'Reihe: '.$counter.' Position: '.$x.'/'.$y.' | Tile :'.$tile.'<br/>';
  18.                 $this->mapPositions[] = array($x,$y);
  19.  
  20.             }
  21.             $counter++;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement