Skip to content
Snippets Groups Projects
Commit 050a2649 authored by Greatroot's avatar Greatroot
Browse files

Add more tile types and get sidewalk fixer and curb ramp placer tools working...

Add more tile types and get sidewalk fixer and curb ramp placer tools working (along with basic tool toggling and creating a base map for level 1.
parent bdfca739
Branches master
No related tags found
No related merge requests found
Showing
with 19 additions and 3 deletions
......@@ -22,8 +22,6 @@ class GridTile {
// roadSidewalkVertical_BrokenImg = laodImage("road_vert_broken_sidewalk.png"); // (9) road with broken sidwalk (vertical)
// roadSidewalkHorizontal_BrokenImg = laodImage("road_horiz_broken_sidewalk.png"); // (10) road with broken sidwalk (horizontal)
// Orientation can either be:
//
/* Orientation can either be
- vertical
- horizontal
......
......@@ -3,7 +3,7 @@
// while x/y screen represent coordinates in relation to the
// computer screen resolution
class TileClass {
constructor(x_grid, y_grid, x_screen, y_screen, sprite) {
constructor(x_grid, y_grid, x_screen, y_screen, sprite, type, orientation) {
this.x_grid = x_grid;
this.y_grid = y_grid;
......@@ -11,6 +11,24 @@ class TileClass {
this.y_screen = y_screen;
this.sprite = sprite;
/* Type can either be
- decoration (grass, house, etc)
- road
- sidewalk
- broken_sidewalk
- sidewalk_corner
- sidewalk_corner_curbRamp
*/
this.type = type;
/* Orientation can either be
- normal (rotated 0 degrees)
- rotated90
- rotated180
- rotated270
*/
this.orientation = orientation;
}
// Display the provided sprite at the tile's screen coordinates
......
File added
File added
No preview for this file type
File deleted
File added
File deleted
File deleted
File added
No preview for this file type
File deleted
File added
File added
File added
File moved
File moved
File moved
File moved
assets/tile_pngs/grass.png

529 B

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment