本文整理汇总了Python中engine.Engine._createWorld方法的典型用法代码示例。如果您正苦于以下问题:Python Engine._createWorld方法的具体用法?Python Engine._createWorld怎么用?Python Engine._createWorld使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类engine.Engine
的用法示例。
在下文中一共展示了Engine._createWorld方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _createWorld
# 需要导入模块: from engine import Engine [as 别名]
# 或者: from engine.Engine import _createWorld [as 别名]
def _createWorld(self):
Engine._createWorld(self)
bot = Person(self, "b1")
bot.setPosition(self.spawnLocation())
self.objects += [bot]
示例2: _createScene
# 需要导入模块: from engine import Engine [as 别名]
# 或者: from engine.Engine import _createWorld [as 别名]
def _createScene(self):
Engine._createWorld(self)
self.sceneManager.setAmbientLight((1.0, 1.0, 1.0, 1.0))
## self.sceneManager.setShadowTechnique(ogre.SHADOWTYPE_NONE)
## self.sceneManager.setShadowColour((0.5, 0.5, 0.5))
## self.sceneManager.setShadowTextureSize(1024)
## self.sceneManager.setShadowTextureCount(2)
light = self.sceneManager.createLight("sunlight")
light.setType(ogre.Light.LT_DIRECTIONAL) # or .type
light.setDirection((0.4,-0.4,-1))
light.setDiffuseColour(0.85,0.85,0.85)
#light.setCastShadows(True)
entity = self.sceneManager.createEntity('bgE', 'Scene.mesh')
#entity.setCastShadows(False)
node = self.sceneManager.getRootSceneNode().createChildSceneNode('bgN')
node.attachObject(entity)
node.setVisible(True)
## node.setDirection(0,0,-1)
## node.setScale(0.05,0.05,0.05)
## tempWorld = OgreOde.World(self.sceneManager)
## self.createStaticTriangleMesh(entity, self.space)
## geom = self.createStaticTriangleMesh(entity, self.space)
## print type(geom)
self.createLogo()
## self.createMenu()
# Setup Audio
self.soundManager = OgreAL.SoundManager()
self.soundManager.getListener().setDirection((0,25,75))
self.sfx = SFX(self.soundManager)
## setup GUI system
self.GUIRenderer = CEGUI.OgreCEGUIRenderer(self.renderWindow,
ogre.RENDER_QUEUE_OVERLAY, False, 3000, self.sceneManager)
self.GUIsystem = CEGUI.System(self.GUIRenderer)
logger = CEGUI.Logger.getSingleton()
logger.setLoggingLevel( CEGUI.Informative )
winMgr = CEGUI.WindowManager.getSingleton()
## load scheme and set up defaults
CEGUI.SchemeManager.getSingleton().loadScheme("TaharezLook.scheme")
self.GUIsystem.setDefaultMouseCursor("TaharezLook", "MouseArrow")
CEGUI.MouseCursor.getSingleton().setVisible(False)
CEGUI.ImagesetManager.getSingleton().createImageset("menu.imageset")
winMgr.loadWindowLayout("menu.layout")
winMgr.loadWindowLayout("hud.layout")
sheet = winMgr.getWindow("Background")
#self.GUIsystem.setGUISheet(winMgr.getWindow("Menu"))
self.GUIsystem.setGUISheet(sheet)
font = CEGUI.FontManager.getSingleton().createFont("tuffy.font")
textwnd = winMgr.getWindow("TextWindow")
self._scoreWindow = winMgr.getWindow("ScoreWindow")
self._debugWindow = winMgr.getWindow("DebugWindow")
self._vitalsWindow = winMgr.getWindow("VitalsWindow")
# Materials
myMaterial = ogre.MaterialManager.getSingleton().create("bullets","a")
myMaterial.setLightingEnabled(False)
myMaterial.setDepthWriteEnabled(False)
myMaterial.setSceneBlending(ogre.SBT_TRANSPARENT_ALPHA)
## myMaterial.getTechnique(0).getPass(0).setVertexColourTracking(ogre.TVC_DIFFUSE)
myMaterial = ogre.MaterialManager.getSingleton().create("cursor","b")
myMaterial.setLightingEnabled(False)
myMaterial.setDepthWriteEnabled(False)
myMaterial.setSceneBlending(ogre.SBT_TRANSPARENT_ALPHA)
myMaterial.getTechnique(0).getPass(0).setVertexColourTracking(ogre.TVC_AMBIENT | ogre.TVC_DIFFUSE)
myMaterial = ogre.MaterialManager.getSingleton().create("grenade","c")
示例3: _createScene
# 需要导入模块: from engine import Engine [as 别名]
# 或者: from engine.Engine import _createWorld [as 别名]
def _createScene(self):
Engine._createWorld(self)
self.sceneManager.setAmbientLight((1.0, 1.0, 1.0, 1.0))
self.createLogo()