当前位置: 首页>>代码示例>>Python>>正文


Python GameLogic.expandPath方法代码示例

本文整理汇总了Python中GameLogic.expandPath方法的典型用法代码示例。如果您正苦于以下问题:Python GameLogic.expandPath方法的具体用法?Python GameLogic.expandPath怎么用?Python GameLogic.expandPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GameLogic的用法示例。


在下文中一共展示了GameLogic.expandPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: print

# 需要导入模块: import GameLogic [as 别名]
# 或者: from GameLogic import expandPath [as 别名]
import dao
import numpy as np
import serial
import xinput
import gnoomutils as gu
import sys
import time
import GameLogic

try:
    GameLogic.Object
    init = 0
except:
    init = 1

blenderpath = GameLogic.expandPath('//')

if init:
    print(blenderpath)
    GameLogic.Object = {}
    print("BLENDER: GameLogic object created")
    GameLogic.Object['closed'] = False
    
    GameLogic.setLogicTicRate(60)
    
    mice = xinput.find_mice(model="Mouse")
    m = [mice[0],mice[1]]
    for mouse in m:
        xinput.set_owner(mouse) # Don't need this if using correct udev rule
        xinput.switch_mode(mouse)
        
开发者ID:kemerelab,项目名称:VR_Ball,代码行数:32,代码来源:camera_r.py

示例2:

# 需要导入模块: import GameLogic [as 别名]
# 或者: from GameLogic import expandPath [as 别名]
# if video hasn't been added 
else:

	# import VideoTexture module
	import VideoTexture
	
	# get matID for the movie screen	
	matID = VideoTexture.materialID(obj, "MA" + obj['material'])

	# get the texture
	video = VideoTexture.Texture(obj, matID)
	
	movieName = obj['movie']
	
	# get movie path
	movie = GameLogic.expandPath('//' + movieName)
	
	# get movie
	video.source = VideoTexture.VideoFFmpeg(movie)
	
	# set scaling
	video.source.scale = True	
	
	# save mirror as an object variable
	obj["Video"] = video
	
	# check for optional loop property
	if "loop" in obj:
		
		# loop it forever
		if obj['loop'] == True:
开发者ID:SystemJSN,项目名称:Holy-Grail-War,代码行数:33,代码来源:Movie.py


注:本文中的GameLogic.expandPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。