box2d_viewer.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:maml_rl 作者: cbfinn 项目源码 文件源码
def _Keyboard_Event(self, key, down=True):
        """
        Internal keyboard event, don't override this.

        Checks for the initial keydown of the basic testbed keys. Passes the
        unused ones onto the test via the Keyboard() function.
        """
        if down:
            if key == pygame.K_z:       # Zoom in
                self.viewZoom = min(2 * self.viewZoom, 500.0)
            elif key == pygame.K_x:     # Zoom out
                self.viewZoom = max(0.9 * self.viewZoom, 0.02)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号