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


Python viztask.waitTime函数代码示例

本文整理汇总了Python中viztask.waitTime函数的典型用法代码示例。如果您正苦于以下问题:Python waitTime函数的具体用法?Python waitTime怎么用?Python waitTime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: reachTeapotTask

def reachTeapotTask():
	tryNum = 0
	while(True) :
		global reachedTeapot
		reachedTeapot = False
		global avoidCat
		avoidCat = True

		# Action for hiding/showing text
		DelayHide = vizact.sequence( vizact.waittime(8), vizact.method.visible(False) )
		Show = vizact.method.visible(True)

		instructions.setText("Welcome!")
		instructions.runAction(DelayHide)
		yield viztask.waitTime(5)
		instructions.runAction(Show)
		instructions.setText("Now, try to get the teapot without touching the cat in 15 seconds!")
		instructions.runAction(DelayHide)
		yield viztask.waitTime(15)
		instructions.runAction(Show)

		instructions.setText("Reached Teapot: "+str(reachedTeapot)+" Avoided Cat: "+str(avoidCat))
		yield viztask.waitTime(5)
		yield ClapTask()
		tryNum = tryNum + 1
		data = 'Try '+str(tryNum)+' Reached Teapot: '+str(reachedTeapot)+' Avoided Cat: '+str(avoidCat)+'\n'
		teapot_game_data.write(data)
		instructions.setText("Now, try again or exit to leave!")
		yield viztask.waitTime(5)
开发者ID:vhilab,项目名称:VRITS-2015,代码行数:29,代码来源:FridayScript.py

示例2: testPhase

def testPhase():
    info.setText("Experiment running")
    info.visible(viz.ON)
    vizact.ontimer(1, getData)
    yield viztask.waitTime(10)
    
    info.setText("Experiment over")
    yield viztask.waitTime(2)
开发者ID:vhilab,项目名称:VRITS-2015,代码行数:8,代码来源:pit.py

示例3: walk

def walk():
	while (True) :
		yield viztask.addAction(cat,vizact.walkTo([2.8, 0, -3], walkSpeed = 1.5, turnSpeed = 1, walkAnim = 4))
		yield viztask.waitTime(1.5)
		yield look1()
		yield viztask.addAction(cat,vizact.walkTo([-2.8, 0, -3], walkSpeed = 1.5, turnSpeed = 1, walkAnim = 4))
		yield viztask.waitTime(1.5)
		yield look2()
开发者ID:vhilab,项目名称:VRITS-2015,代码行数:8,代码来源:FridayScript.py

示例4: endingPhase

def endingPhase():
	childLookAtYou()
	windAudio.stop()
	endingAudio.play()
	yield viztask.waitTime(CHILD_RECOVERY_TIME)
	childModel.state(6)
	yield viztask.waitTime(endingAudioBasic.getDuration() - CHILD_RECOVERY_TIME)
	yield viztask.waitTime(END_TIME)
	finish()
开发者ID:vhilab,项目名称:Demos,代码行数:9,代码来源:Flying_Demo_2015.py

示例5: policeApproach

def policeApproach(scene=viz.MainScene):
    yield viztask.waitTime(TIME_BEFORE_POLICE)
    addSirens(scene)
    yield viztask.waitTime(sirenAudio.getDuration())
    moveFlashlightToCar(scene, POLICE_WALK_TIME)
    yield viztask.waitTime(POLICE_WALK_TIME)
    footstepsAudio.stop()

    global flashlight
    policeOfficerAudio = flashlight.playsound("resources/audio/PoliceOfficer.wav")
开发者ID:vhilab,项目名称:homelessness-study,代码行数:10,代码来源:PoliceNarrative.py

示例6: testPhase

def testPhase():
	info.setText("Testing")
	info.visible(viz.ON)
	position = viz.MainView.getPosition()
	data = 'position:' + '\n'+str(position)
	data_file.write(data)
	yield viztask.waitTime(5)
	info.visible(viz.OFF)
	info.setText("Experiment finished testing phase")
	info.visible(viz.ON)
	yield viztask.waitTime(2)
开发者ID:vhilab,项目名称:VRITS-2015,代码行数:11,代码来源:megha_day3_challenge6.py

示例7: walking

def walking():
	yield viztask.waitKeyDown(' ')
	male.addAction(vizact.walkTo([1, 0, 0]))
	yield vizproximity.waitEnter(femaleSensor)
	female.state(3)
	yield viztask.waitTime(2)
	male.state(33)
	yield viztask.waitTime(3)
	male.addAction(vizact.walkTo([-4, 0, 0], walkAnim = 70, walkSpeed = 2))
	yield vizproximity.waitExit(femaleSensor)
	female.state(8)
开发者ID:vhilab,项目名称:VRITS-2015,代码行数:11,代码来源:Test_Room_Script+sample.py

示例8: prepareForObjectSelling

def prepareForObjectSelling( obj ):
	global SCENE, APARTMENT, OBJECTS, RIFT
	audio = obj.narrationFile[0]
	sound = viz.addAudio(audio)
	duration = sound.getDuration()
	yield viztask.waitTime(1)
	sound.play()
	print "now playing audio for prepare for selling object"
	yield viztask.waitTime(duration)
	ObjectSelling.init(APARTMENT, OBJECTS, SCENE, RIFT)
	ObjectSelling.enable()
开发者ID:vhilab,项目名称:homelessness-study,代码行数:11,代码来源:ApartmentNarration.py

示例9: learnPhase

def learnPhase():
    # provide instructions for the participant
    info.setText("You'll have 30 seconds to explore")
    info.visible(viz.ON)

    # hide instructions after 5 seconds
    yield viztask.waitTime(5)
    info.visible(viz.OFF)

    # let participant know learning phase has ended
    yield viztask.waitTime(30)
    Reset()
开发者ID:vhilab,项目名称:VRITS-2015,代码行数:12,代码来源:PitDemo.py

示例10: findCup

def findCup(bottle):
	disableSelector()
	
	yield moveToDash(bottle)
	yield viztask.waitTime(TIME_BETWEEN_TASKS) # wait a bit before next task

	#Play instructions.
	cupInstructions = car.playsound('resources/audio/find_cup_audio.wav')
	#Wait for instructions to end
	yield viztask.waitTime(cupInstructions.getDuration())
	
	enableSelector([cup1, cup2])
开发者ID:vhilab,项目名称:homelessness-study,代码行数:12,代码来源:PosessionHunting.py

示例11: findBottle

def findBottle():
	disableSelector()
	
	yield moveToDash(toothPaste)
	yield viztask.waitTime(TIME_BETWEEN_TASKS) # wait a bit before next task
	
	#Play instructions.
	bottleInstructions = car.playsound('resources/audio/find_bottle_audio.wav')
	#Wait for instructions to end
	yield viztask.waitTime(bottleInstructions.getDuration())
	
	enableSelector([bottle1, bottle2, bottleCap1, bottleCap2])
开发者ID:vhilab,项目名称:homelessness-study,代码行数:12,代码来源:PosessionHunting.py

示例12: findToothBrush

def findToothBrush():
	#Wait for start of experiment
	yield viztask.waitTime(3)
	
	#Play instructions.
	toothBrushInstructions = car.playsound('resources/audio/find_toothbrush_audio.wav')
	
	#Wait for instructions to end.
	yield viztask.waitTime(toothBrushInstructions.getDuration())
	
	#enable selector
	selector.enable()
开发者ID:vhilab,项目名称:homelessness-study,代码行数:12,代码来源:PosessionHunting.py

示例13: playPhoneAndRadio

def playPhoneAndRadio():
	
	global main_screen, radio, selector, phoneEvent
	yield screen.playsound('resources/audio/vibrate.wav', viz.STOP)
	yield selector.disable()
	yield selector.disable()
	yield screen.endAction( pool = 0)
	yield vizact.removeEvent(phoneEvent)
	voicemail = screen.playsound('resources/audio/voicemail_mono.wav', viz.PLAY)
	yield viztask.waitTime(voicemail.getDuration())
	newsReport = radio.playsound('resources/audio/RadioShowScene_louder.wav')
	yield viztask.waitTime(newsReport.getDuration())
	viz.sendEvent(INTRO_OVER_EVENT)
开发者ID:vhilab,项目名称:homelessness-study,代码行数:13,代码来源:PhoneRadio.py

示例14: setupTarget

def setupTarget():
	viztask.waitTime(5)
	target = viz.add('arm/all_target.wrl')
	target.setScale(.01, .01, .01)
	target.setEuler(0, 90, 0)
	target.setPosition([-1.35, 1.5, -1.5])
	reportTargetTime()
	
	#Adds invisible cube that launches fire
	global targetcube 
	targetcube = []
	targetcube.append(TouchCube())
	targetcube[0].setPosition([-1.35, 1.5, -1.5])
开发者ID:vhilab,项目名称:thirdArm,代码行数:13,代码来源:touchcube.py

示例15: findToothPaste

def findToothPaste():
	disableSelector()
	
	yield moveToDash(toothBrush)

	lowerBlanket()
	yield viztask.waitTime(TIME_BETWEEN_TASKS) # wait a bit longer before new instructions
	
	#Play instructions.
	toothPasteInstructions = car.playsound('resources/audio/find_toothpaste_audio.wav')
	#Wait for instructions to end
	yield viztask.waitTime(toothPasteInstructions.getDuration())
	
	enableSelector([toothPaste,cap,cup1])
开发者ID:vhilab,项目名称:homelessness-study,代码行数:14,代码来源:PosessionHunting.py


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