game.limit = function(character, dt) if character.position.x <= character.origin.x then character.position.x = character.origin.x elseif character.position.x >= windowProfile.mode.width - character.origin.x then character.position.x = windowProfile.mode.width - character.origin.x end if character.position.y <= character.origin.y then character.position.y = character.origin.y elseif character.position.y >= windowProfile.mode.height - character.origin.y then character.position.y = windowProfile.mode.height - character.origin.y end end