Fixed a bug in the tilemap rendering so the tile offsets were wrong. Now renders perfectly :) Also fixed issue that would cause the World to resize smaller than the game size (not allowed for rendering reasons).

This commit is contained in:
Richard Davey
2013-09-12 02:18:23 +01:00
parent 89b00db103
commit 3d22d0e169
8 changed files with 180 additions and 23 deletions
+5 -4
View File
@@ -44,6 +44,7 @@
t = new Phaser.Tilemap(game, 'csvtiles', 'csvtest', Phaser.Tilemap.FORMAT_CSV, true, 16, 16);
// SHould be added to the World and rendered automatically :)
r = new Phaser.TilemapRenderer(game);
}
@@ -54,20 +55,20 @@
if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT))
{
game.camera.x -= 4;
game.camera.x -= 8;
}
else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT))
{
game.camera.x += 4;
game.camera.x += 8;
}
if (game.input.keyboard.isDown(Phaser.Keyboard.UP))
{
game.camera.y -= 4;
game.camera.y -= 8;
}
else if (game.input.keyboard.isDown(Phaser.Keyboard.DOWN))
{
game.camera.y += 4;
game.camera.y += 8;
}
}