This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GameScene extends Scene { | |
// ... | |
public override function update() { | |
// Keep camera.x centered on the player | |
HXP.camera.x = player.x - HXP.halfWidth + 64; | |
// Keep camera.y centered on the player, | |
// unless it would show below the map. | |
// In that case, keep to the bottom fo the map. |