Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $counter = 0;
- for($y = $this->startY;$y <= ($this->startY+$this->displayHeight) ;$y++) {
- if($counter %2 == 1) {
- $width = $this->startX+$this->displayWidth;
- }else {
- $width = $this->startX+$this->displayWidth-1;
- }
- for($x = $this->startX;$x < $width;$x++) {
- if(empty($this->mapTiles[$x][$y][0])) {
- $tile = 'black';
- }else {
- $tile = $this->mapTiles[$x][$y][0];
- }
- $this->jsonMapTiles[]= $tile;
- //Diese Ausgabe ist nur fr den test
- echo 'Reihe: '.$counter.' Position: '.$x.'/'.$y.' | Tile :'.$tile.'<br/>';
- $this->mapPositions[] = array($x,$y);
- }
- $counter++;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement