def step( self, dt ):
        buttons = self.buttons
        move_dir = eu.Vector2(buttons['right']-buttons['left'],
                              buttons['up']-buttons['down'])
        changed = False
        if move_dir:
            new_pos = self.player.position + self.player.fastness*dt*move_dir.normalize()
            new_pos = self.clamp(self.player, new_pos)

            self.player.position = new_pos
            changed = True

        new_zoom = self.scroller.scale + (buttons['zoomin']-buttons['zoomout'])*0.2*dt
        if new_zoom < 0.3:
            new_zoom = 0.3
        elif new_zoom > 2.0:
            new_zoom = 2.0
        if new_zoom != self.scroller.scale:
            self.scroller.scale = new_zoom
            changed = True

        if changed:
            self.update_after_change()
dataset/ETHPy150Open los-cocos/cocos/test/test_scrolling_manager_without_tiles_autoscale.py/SquareLand.step/original