Пример #1
0
		def OnRender(self):
			grp.ClearDepthBuffer()

			grp.SetGameRenderState()
			grp.PushState()
			grp.SetOmniLight()

			screenWidth = wndMgr.GetScreenWidth()
			screenHeight = wndMgr.GetScreenHeight()
			newScreenWidth = float(screenWidth+30)
			newScreenHeight = float(screenHeight+30)
			
			grp.SetViewport(270.0/screenWidth, 0.0, newScreenWidth/screenWidth, newScreenHeight/screenHeight)

			app.SetCenterPosition(20.0, -470.0, -100.0)
			app.SetCamera(2800.0, 15.0, 180.0, 102.0)
			grp.SetPerspective(10.0, newScreenWidth/newScreenHeight, 1000.0, 4000.0)

			(x, y) = app.GetCursorPosition()
			grp.SetCursorPosition(x, y)

			chr.Deform()
			chr.Render()

			grp.RestoreViewport()
			grp.PopState()
			grp.SetInterfaceRenderState()
Пример #2
0
    def __MakeCharacter(self, race, x, y):
        nonplayer.GetEventType(1)
        nonplayer.GetGradeByVID(1)
        nonplayer.GetLevelByVID(100)
        nonplayer.GetMonsterName("SeMa Test")

        nonplayer.LoadNonPlayerData()

        chr.CreateInstance(race)
        chr.SetInstanceType(chr.INSTANCE_TYPE_NPC)
        chr.SelectInstance(race)
        chr.SetVirtualID(race)
        chr.SetRace(1)
        chr.SetNameString("Test SeMa")

        chr.Refresh()
        #chr.SetMotionMode(chr.MOTION_MODE_GENERAL)
        #chr.SetLoopMotion(chr.MOTION_MODE_GENERAL)

        chr.SetPixelPosition(x, y)
        chr.SetDirection(chr.DIR_SOUTHEAST)
        chr.SetMoveSpeed(300)
        chr.Render()
        grp.RestoreViewport()
        grp.PopState()
        grp.SetInterfaceRenderState()
        chr.Show()
Пример #3
0
 def OnRender(self):
     app.RenderGame()
     grp.PopState()
     grp.SetInterfaceRenderState()