Skip to content

Commit

Permalink
These methods have been moved to AkihabaraTile.
Browse files Browse the repository at this point in the history
  • Loading branch information
PotHix committed Feb 6, 2012
1 parent f2c2444 commit 7ce853b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/plugins/platformer.js
Expand Up @@ -69,12 +69,12 @@ var AkihabaraPlatformer = {

if (map.tileIsSolidCeil(th, top)) {
th.accy = 0;
th.y = AkihabaraHelpers.yPixelToTile(map, th.y, 1);
th.y = AkihabaraTile.yPixelToTile(map, th.y, 1);
th.touchedceil = true;
}
if (map.tileIsSolidFloor(th, bottom)) {
th.accy = 0;
th.y = AkihabaraHelpers.yPixelToTile(map, th.y + th.h) - th.h;
th.y = AkihabaraTile.yPixelToTile(map, th.y + th.h) - th.h;
th.touchedfloor = true;
}
},
Expand All @@ -93,12 +93,12 @@ var AkihabaraPlatformer = {

if ((th.accx < 0) && map.tileIsSolidFloor(th, left)) {
th.accx = 0;
th.x = AkihabaraHelpers.xPixelToTile(map, th.x - 1, 1);
th.x = AkihabaraTile.xPixelToTile(map, th.x - 1, 1);
th.touchedleftwall = true;
}
if ((th.accx > 0) && map.tileIsSolidFloor(th, right)) {
th.accx = 0;
th.x = AkihabaraHelpers.xPixelToTile(map, th.x + th.w) - th.w;
th.x = AkihabaraTile.xPixelToTile(map, th.x + th.w) - th.w;
th.touchedrightwall = true;
}
t += AkihabaraGamebox.getTiles(map.tileset).tileh / (precision ? precision : 1);
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/topview.js
Expand Up @@ -403,19 +403,19 @@ var AkihabaraTopview = {

if (th.touchedup) {
th.accy = 0;
th.y = AkihabaraHelpers.yPixelToTile(map, th.y + th.coly, 1) - th.coly;
th.y = AkihabaraTile.yPixelToTile(map, th.y + th.coly, 1) - th.coly;
}
if (th.toucheddown) {
th.accy = 0;
th.y = AkihabaraHelpers.yPixelToTile(map, th.y + th.coly + th.colh - 1) - th.coly - th.colh;
th.y = AkihabaraTile.yPixelToTile(map, th.y + th.coly + th.colh - 1) - th.coly - th.colh;
}
if (th.touchedleft) {
th.accx = 0;
th.x = AkihabaraHelpers.xPixelToTile(map, th.x + th.colx, 1) - th.colx;
th.x = AkihabaraTile.xPixelToTile(map, th.x + th.colx, 1) - th.colx;
}
if (th.touchedright) {
th.accx = 0;
th.x = AkihabaraHelpers.xPixelToTile(map, th.x + th.colx + th.colw - 1) - th.colx - th.colw;
th.x = AkihabaraTile.xPixelToTile(map, th.x + th.colx + th.colw - 1) - th.colx - th.colw;
}
},

Expand Down

0 comments on commit 7ce853b

Please sign in to comment.