def init(avatar, pack_objs, intro, **kwargs):
	global isBusScene, moveSeats, seatQueue
	isBusScene = False
	DetectWhetherInView.init(**kwargs)
	seats = [Seats.getseatplacement(id)[0] for id in avatar.teleSeatIDs] # TODO: Abstract to handle arbitrary orientation too (for front right seats)
	seatQueue = deque([[seat[0],seat[1],seat[2]-0.5] for seat in seats]) # Node is in bus aisle

	
	global introAudio1, introAudio2
	introAudio1 = intro
	introAudio2 = viz.addAudio('Audio/CreepyTaskIntroduction.wav')
	
	FadeObject.init(pack_objs, 25, 0.01, **kwargs)
	
	viztask.schedule( creepilyMoveCloser(avatar) )
예제 #2
0
def init(objects, time, r, **kwargs):
	global objs
	objs = objects
	
	global rate
	rate = r
	
	global offset
	offset = (1 - END_FADE_ALPHA_VALUE)*rate/time
	
	# This multiplier is used to create an offset that would cause the total fade time to be
	# closer to the time argument passed in to init
	offset *= 1.7
	
	global alpha
	alpha = 1
	
	global detector
	DetectWhetherInView.init(**kwargs)
	detector = DetectWhetherInView.NodeViewDetection(objs[0])