1 decade ago by yarco
Maybe this is a simple question, but i didnt find such attributes in docs.
There are player.pos.x and this.screen.x, i need to stop camera following when meet the end of the map...current i just write down the width directly...
I think it is not right...
There are player.pos.x and this.screen.x, i need to stop camera following when meet the end of the map...current i just write down the width directly...
// 800 is the width here if (player && player.pos.x > ig.system.width / 2 && player.pos.x < 800 - ig.system.width/2) { this.screen.x = player.pos.x - ig.system.width / 2; // this.screen.y = player.pos.y - ig.system.height / 2; }
I think it is not right...