update: function() {
// Update all entities and BackgroundMaps
this.parent();
// screen follows the player
var player = this.getEntitiesByType( EntityPlayer )[0];
if( player ) {
this.screen.x = player.pos.x - ig.system.width/2;
this.screen.y = player.pos.y - ig.system.height/2;
}
},
时间: 2025-01-04 06:12:07