本文整理汇总了Python中com.aurellem.gb.Gb.loadState方法的典型用法代码示例。如果您正苦于以下问题:Python Gb.loadState方法的具体用法?Python Gb.loadState怎么用?Python Gb.loadState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.aurellem.gb.Gb
的用法示例。
在下文中一共展示了Gb.loadState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set_state
# 需要导入模块: from com.aurellem.gb import Gb [as 别名]
# 或者: from com.aurellem.gb.Gb import loadState [as 别名]
def set_state(state, do_step=False):
"""
Injects the given state into the emulator. Use do_step if you want to call
step(), which also allows SDL to render the latest frame. Note that the
default is to not step, and that the screen (if it is enabled) will appear
as if it still has the last state loaded. This is normal.
"""
Gb.loadState(_create_byte_buffer(state))
if do_step:
step()