Skip to content

Commit

Permalink
Tilemap: update for full autotiling (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeCreates authored and Gama11 committed Nov 10, 2018
1 parent 760d6a6 commit d8b2dd0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Binary file added Features/Tilemap/assets/full_tiles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion Features/Tilemap/source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,17 @@ class PlayState extends FlxState
"assets/alt_tiles.png", TILE_WIDTH, TILE_HEIGHT, ALT);
_autoAltButton.label.text = "ALT";

case ALT:
case FULL:
_collisionMap.loadMapFromCSV(FlxStringUtil.arrayToCSV(_collisionMap.getData(true), _collisionMap.widthInTiles),
"assets/empty_tiles.png", TILE_WIDTH, TILE_HEIGHT, OFF);
_autoAltButton.label.text = "OFF";

case ALT:
_collisionMap.loadMapFromCSV(FlxStringUtil.arrayToCSV(_collisionMap.getData(true), _collisionMap.widthInTiles),
"assets/full_tiles.png", TILE_WIDTH, TILE_HEIGHT, FULL);
_autoAltButton.label.text = "FULL";


case OFF:
_collisionMap.loadMapFromCSV(FlxStringUtil.arrayToCSV(_collisionMap.getData(true), _collisionMap.widthInTiles),
"assets/auto_tiles.png", TILE_WIDTH, TILE_HEIGHT, AUTO);
Expand All @@ -203,9 +209,15 @@ class PlayState extends FlxState
_collisionMap.loadMapFromCSV("assets/default_alt.txt", "assets/alt_tiles.png", TILE_WIDTH, TILE_HEIGHT, ALT);
_player.setPosition(64, 128);

case FULL:
_collisionMap.loadMapFromCSV("assets/default_auto.txt", "assets/full_tiles.png", TILE_WIDTH, TILE_HEIGHT, FULL);
_player.setPosition(64, 64);

case OFF:
_collisionMap.loadMapFromCSV("assets/default_empty.txt", "assets/empty_tiles.png", TILE_WIDTH, TILE_HEIGHT, OFF);
_player.setPosition(64, 64);
default:

}
}
}

0 comments on commit d8b2dd0

Please sign in to comment.