def loadBoatScene():
 boatscene.initBoat()
 boatscene.initIschia()
 #boatscene.revealScene()
 boatscene.initFog()
 boatscene.revealScene()
 boatscene.unhideBoatAndIschia()
Пример #2
0
def startBoatOutro():
 global skipKey
 #yield viztask.waitEvent(scavengerhunt.ZONE3_OVER_EVENT)
 yield viztask.waitAny([viztask.waitTime(52), skipKey])
 globals_oa.ZONE3_AUDIO_1.stop()
 yield fader.fadeOutTask()
 globals_oa.user.setPosition([0,0,0])
 killOceanScene()
 
 yield fader.fadeOutTask()
 globals_oa.AUDIO_SPHERICAL_TRANSITION.play()
 result = yield viztask.waitAny([viztask.waitMediaEnd(globals_oa.AUDIO_SPHERICAL_TRANSITION), skipKey])
 if result.condition is skipKey:
  globals_oa.AUDIO_SPHERICAL_TRANSITION.stop()
 
 # Gets rid of all the fish
 for school in schooling.all_fish_schools:
  school.hidePercentage(100)
 
 # Stops swimming
 # transport_vhil.onKeyDown('g')
# viz.MainScene.disable(viz.FOG, op=viz.OP_ROOT)

 # Change parameters to False, True for PPT 1
 vhilGo(True, False, keyboardcontrol=False)
 player = spherical_player_Vive.Player(globals_oa.SPHERICAL_VIDEO, PPT1=False, radius=2.7, playPauseKey=' ')
 
 screenPosition = player.screen.getPosition()
 viz.MainView.setPosition([screenPosition[0], 1.82, screenPosition[1]])
 
 player.toggleLooping()
 player.play()
 yield fader.fadeInTask()

 yield viztask.waitAny([viztask.waitTime(2), skipKey])
 globals_oa.AUDIO_SPHERICAL_1.play()
 result = yield viztask.waitAny([viztask.waitMediaEnd(globals_oa.AUDIO_SPHERICAL_1), skipKey])
 if result.condition is skipKey:
  globals_oa.AUDIO_SPHERICAL_1.stop()
 
 yield viztask.waitTime(1)
 globals_oa.AUDIO_SPHERICAL_2.play()
 result = yield viztask.waitAny([viztask.waitMediaEnd(globals_oa.AUDIO_SPHERICAL_2), skipKey])
 if result.condition is skipKey:
  globals_oa.AUDIO_SPHERICAL_2.stop()
 
 # Waits until the video is done playing
 result = yield viztask.waitAny([viztask.waitTime(player.getVideoDuration() - globals_oa.AUDIO_SPHERICAL_1.getDuration() - globals_oa.AUDIO_SPHERICAL_2.getDuration() - 3.5), skipKey])
 if result.condition is skipKey:
  player.pause()

 yield fader.fadeOutTask()
 
 player.screen.visible(viz.OFF)
 globals_oa.AUDIO_ZONE3_AMBIENT.pause()
 
# killOceanScene()
 boatscene.revealScene()
 boatscene.unhideBoatAndIschia()
 yield viztask.waitAny([viztask.waitTime(3), skipKey])
 globals_oa.AUDIO_BOAT_AMBIENT_OUTRO.play()
 yield fader.fadeInTask()
 yield viztask.waitAny([viztask.waitTime(3), skipKey])
 
 playAudioAndSaveGlobalPointer(globals_oa.BOAT_AUDIO_OUTRO_2)
 result = yield viztask.waitAny([viztask.waitMediaEnd(globals_oa.BOAT_AUDIO_OUTRO_2), skipKey])
 markAudioPlayAsEnded()
 if result.condition is skipKey:
  globals_oa.BOAT_AUDIO_OUTRO_2.stop()

 viz.clearcolor(0, 0, 0)
 
 yield fader.fadeOutTask()
 boatscene.killScene()
 
 
 yield viztask.waitTime(3)
 
 viztask.schedule(loadAcknowledgment)
 yield fader.fadeInTask() #1.5
 yield viztask.waitTime(globals_oa.BETWEEN_FADING_TIME) #4
 yield fader.fadeOutTask() #1.5