本文整理匯總了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()