本文整理汇总了Python中core.Core.init方法的典型用法代码示例。如果您正苦于以下问题:Python Core.init方法的具体用法?Python Core.init怎么用?Python Core.init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core.Core
的用法示例。
在下文中一共展示了Core.init方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createTiles
# 需要导入模块: from core import Core [as 别名]
# 或者: from core.Core import init [as 别名]
EngineSettings.FpsLimit = 2000 # kept high for dev purposes
# Initial libtcod setup...
libtcod.console_set_custom_font('fonts/arial12x12.png', libtcod.FONT_TYPE_GREYSCALE | libtcod.FONT_LAYOUT_TCOD)
libtcod.console_init_root(EngineSettings.ScreenWidth, EngineSettings.ScreenHeight, 'Light test', False)
libtcod.sys_set_fps(EngineSettings.FpsLimit)
libtcod.sys_set_renderer(libtcod.RENDERER_OPENGL)
# Initialize our own engine
EngineSettings.ViewWidth = 80
EngineSettings.ViewHeight = 50-7
Core.init()
# Load testmap into the scene
testTiles, w, h = createTiles()
Core.mainScene.SetTiles(testTiles, w, h)
panels = [Core.mainScene] # We will pass this list to the Renderer, to render the tree of panels
# Create a message log, with the mainWindow as parent
gamelog = LogPanel(Core.mainScene.MainWindow, Rect(0, EngineSettings.ScreenHeight-7, EngineSettings.ScreenWidth, 7),
padding=Padding(left=1, right=1, top=1, bottom=1),
color_data=ColorData(background_color=libtcod.darkest_sepia))
Core.logWin = gamelog
# Create some light