fix: view port should track player

This commit is contained in:
Renge 2022-04-08 20:16:20 -04:00
parent ecf14b4073
commit 63bb9c3d79

View File

@ -26,6 +26,7 @@ export default class Tutorial extends GameLevel{
// Add the level 1 tilemap
this.add.tilemap("forest1", new Vec2(2, 2));
this.viewport.setBounds(0, 0, this.map.width*32, this.map.height*32);
this.viewport.follow(this.player);
this.playerSpawn = new Vec2(5*32, 9*32);